From: SourceForge.net <no...@so...> - 2009-03-19 16:02:22
|
Bugs item #2694759, was opened at 2009-03-19 11:02 Message generated for change (Tracker Item Submitted) made by dlsmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=2694759&group_id=44253 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DynamicJava Group: 4: Serious Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dan Smith (dlsmith) Assigned to: Dan Smith (dlsmith) Summary: enums can't appear in EnumSets Initial Comment: Due to the way DynamicJava-defined enums are implemented, the EnumSet API class doesn't recognize them as enums and throws an exception when trying to create a set of that type. > enum Foo { A, B, C}; > EnumSet set > set = EnumSet.allOf(Foo.class) java.lang.ClassCastException: class Foo not an enum at java.util.EnumSet.noneOf(EnumSet.java:93) at java.util.EnumSet.allOf(EnumSet.java:110) > Also got this type error, which should be looked at more closely: > EnumSet<Foo> set Static Error: Type arguments are invalid ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=2694759&group_id=44253 |