[Pas2js] nonconsecutive enumeration not implemented
warleyalex
warleyalex at yahoo.com.br
Wed Feb 14 18:51:32 CET 2018
type
TSuit = (Hearts, Clubs, Diamonds, Spades);
The pas2js compiler emits:
this.TSuit = {
"0" : "Hearts", Hearts : 0,
"1" : "Clubs", Clubs : 1,
"2" : "Diamonds", Diamonds : 2,
"3" : "Spades", Spades : 3
};
------------------------------------------------------------
type
TSuit = (Hearts = 1, Clubs, Diamonds = 10, Spades);
I think the compiler should emit this object:
this.TSuit = { 1:"Hearts", 2:"Clubs", 10:"Diamonds", 11:"Spades" };
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list