Community
Participate
Working Groups
I20050215-2300 (M5 test pass) - have this code: strictfp enum Natural { ONE, TWO; } expected: strictfp is not allowed on the enum type actual: no error is reported - alternatively, have this code: strictfp enum Natural { ONE, TWO; private Natural() { } } expected: the wrong modifier is reported with the type name 'Natural' actual: the error is shown for the constructor
strictfp seems to be allowed on Enum types. The second case should not report a problem.
Created attachment 17988 [details] Apply on HEAD This is fixing the second error.
strictfp is allowed as an enum type modifier, but it is not allowed as a constructor modifier. If the enum type is set as strictfp, the constructor binding is also set as strictfp as well as the enum synthetic methods (valueOf and values). Philippe, I will add this support in the binding of these synthetic methods. So the only modifier that can be set in the source for an enum constructor is private.
Fixed and released in HEAD. Regression test added in EnumTest.test079
Verified in 20050330-0500