Community
Participate
Working Groups
This code should compile fine, but latest reports a error. @interface I { short value() default 0; } public class X { @I(2) void foo() { } } ---------- 1. ERROR in c:\tests_sources\X.java (at line 2) short value() default 0; ^ Type mismatch: cannot convert from int to short ---------- 2. ERROR in c:\tests_sources\X.java (at line 6) @I(2) void foo() { ^ Type mismatch: cannot convert from int to short ---------- 2 problems (2 errors) Adding a cast fixes the problem.
Enabled assignment compatibility rules (with constant narrowing). Added AnnotationTest#test066-067
Fixed
Verified in 200412140800