GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — assignment.type.incompatible only with explicit "extends @Nullable Object" on type parameter · Issue #2995 · typetools/checker-framework Closed DescriptionI could be confused, but: I would expect $ cat Map.java import org.checkerframework.checker.nullness.qual.Nullable; interface Set<E> {} class Map<K extends @Nullable Object> { Set<K> keySet = new KeySet(); class KeySet implements Set<K> {} } $ checker/bin/javac -processor org.checkerframework.checker.nullness.NullnessChecker Map.java Map.java:6: error: [assignment.type.incompatible] incompatible types in assignment. Set<K> keySet = new KeySet(); ^ found : @Initialized @NonNull Map<K extends @Initialized @NonNull Object>.@Initialized @NonNull KeySet required: @Initialized @NonNull Set<K extends @Initialized @Nullable Object> 1 error However, if I tweak the class declaration to the "equivalent" shorter version, then the file compiles successfully. That's the behavior I would have expected in either case. If I suppress the error, the Source file and Activity
MetadataMetadataAssigneesTypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |