1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
// Test case for issue #2186
// https://github.com/typetools/checker-framework/issues/2186
import java.util.ArrayList;
import org.checkerframework.checker.i18n.qual.*;
@LocalizableKey class Issue2186 {
// :: error: (super.invocation.invalid) :: warning: (inconsistent.constructor.type)
Issue2186() {}
// :: error: (super.invocation.invalid) :: warning: (inconsistent.constructor.type)
@LocalizableKeyBottom Issue2186(int x) {}
void test() {
@LocalizableKey Issue2186 obj = new Issue2186();
@LocalizableKeyBottom Issue2186 obj1 = new Issue2186(9);
}
void testDiamond() {
@LocalizableKeyBottom ArrayList<@LocalizableKeyBottom String> list =
// :: warning: (cast.unsafe.constructor.invocation)
new @LocalizableKeyBottom ArrayList<@LocalizableKeyBottom String>();
}
}
|