Skip to content

Commit c333bc7

Browse files
hansonrhansonr
authored andcommitted
// BH 8/19/2017 3.2.2.04 fixes Enum .name being .$name
1 parent b806140 commit c333bc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// TODO: CharacterSequence does not implement Java 8 default methods chars() or codePoints()
1111
// It is possible that these might be loaded dynamically.
1212

13+
// BH 8/19/2017 3.2.2.04 fixes Enum .name being .$name
1314
// BH 8/16/2018 3.2.2.04 fixes Character.toTitleCase$C, [Integer,Long,Short,Byte].toString(i,radix)
1415
// BH 8/13/2018 3.2.2.04 $finals to $finals$ -- basically variables are $xxx, methods are xxx$, and special values are $xxx$
1516
// BH 8/12/2018 3.2.2 adding J2S.onClazzLoaded hook for Clazz loaded
@@ -502,7 +503,7 @@ Clazz.newClass = function (prefix, name, clazz, clazzSuper, interfacez, type) {
502503

503504
Clazz.newEnumConst = function(vals, c, enumName, enumOrdinal, args, cl) {
504505
var o = Clazz.new_(c, args, cl);
505-
o.name = enumName;
506+
o.name = o.$name = enumName;
506507
o.ordinal = enumOrdinal;
507508
o.$isEnumConst = true;
508509
var clazzEnum = c.exClazz;

0 commit comments

Comments
 (0)