You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If subclassing Enumeration.Val to add behavior (methods), zero-param ctor doesn't supply null for name.
Example code to support Mon.isWeekday has broken introspected element naming. The commented lines show the easy workaround, to supply the null name explicitly.
(The no-arg ctor for Val has the result that nextName iterator supplies one null, and only the first element benefits from introspected naming; otherwise, the id is used.)
Scala 2.8.0 final and confirmed on trunk, Java 6u16
If subclassing Enumeration.Val to add behavior (methods), zero-param ctor doesn't supply null for name.
Example code to support Mon.isWeekday has broken introspected element naming. The commented lines show the easy workaround, to supply the null name explicitly.
(The no-arg ctor for Val has the result that nextName iterator supplies one null, and only the first element benefits from introspected naming; otherwise, the id is used.)
Scala 2.8.0 final and confirmed on trunk, Java 6u16
Test showing introspected naming:
The text was updated successfully, but these errors were encountered: