Open GoogleCodeExporter opened 9 years ago
Also, section 18.1.3 of the manual discusses the actual meanings of:
class MyClass<@A T extends @B Object>
http://types.cs.washington.edu/checker-framework/current/checkers-manual.html#ge
nerics
Original comment by jbu...@cs.washington.edu
on 6 Nov 2013 at 12:46
Original comment by Jonathan...@gmail.com
on 2 Apr 2014 at 5:50
This example now emits an error in the locations you would expect (see below)
though we could probably eliminate the error messages on the actual type
arguments since the parameter itself is nonsensical. I will leave this open
for now:
/Users/jburke/Downloads/AtvBoundsError.java:3: error: [bound.type.incompatible]
incompatible bounds in type parameter
class WithAtv<@Nullable TypeParam extends @NonNull Object> {
^
type: (@org.checkerframework.checker.nullness.qual.Nullable :: TypeParam)/*DECL*/ [ extends @Initialized @NonNull Object super @Initialized @Nullable Void]
upper bound: @Initialized @NonNull Object
lower bound: @Initialized @Nullable null
/Users/jburke/Downloads/AtvBoundsError.java:5: error:
[type.argument.type.incompatible] incompatible types in type argument.
@Nullable WithAtv<@Nullable String> strWAtv = null;
^
found : @Initialized @Nullable String
required: @Initialized @NonNull Object
/Users/jburke/Downloads/AtvBoundsError.java:6: error:
[type.argument.type.incompatible] incompatible types in type argument.
@Nullable WithAtv<@NonNull Integer> intWAtv = null;
^
found : @Initialized @NonNull Integer
required: [extends @Initialized @NonNull Object super null
Original comment by Jonathan...@gmail.com
on 8 Apr 2015 at 10:21
Original issue reported on code.google.com by
jbu...@cs.washington.edu
on 6 Nov 2013 at 12:44Attachments: