Closed GoogleCodeExporter closed 9 years ago
Thank you for the example and the report. Work has started on this issue.
That particular message is an internal failure that is useful for debugging
framework issues. If you are interested here is an explanation of the message.
Type systems have a notion of "hierarchy width". "Hierarchy width" is the
number of annotations that should ever appear on a type. And, to be clear, by
"appear" I don't necessarily mean written explicitly. In most cases the
annotations are inferred/defaulted by the type system.
In the case of the Nullness type system, the hierarchy width is 2. (There
should always be an Freedom Before Commit (initialization) annotation and a
Nullness annotation.
http://types.cs.washington.edu/checker-framework/current/checkers-manual.html#in
itialization-checker
Therefore, for the Nullness type system, we always expect two annotations on
any given Java type after the type has been created.
In the above case, when verifying that X can indeed be an argument to T there
is a call:
TypeHierarchy.isSubtype( annotationsOnX, annotationsOnUpperBoundOfT)
Unfortunately it seems that the set of annotations being constructed for T has
3 (rather than 2 annotations): @Initialized @NonNull @Nullable.
The type should be either @NonNull and @Nullable, it should not have both.
Thank you.
Original comment by Jonathan...@gmail.com
on 2 Apr 2014 at 5:50
Thanks for the explanation. It sounds like the error message is fine, it just
isn't something an end user is expected to respond to. Thanks for looking into
it.
Original comment by cus...@google.com
on 2 Apr 2014 at 6:16
Original comment by Jonathan...@gmail.com
on 8 Apr 2015 at 10:25
Original comment by jtha...@cs.washington.edu
on 18 Apr 2015 at 6:42
Original issue reported on code.google.com by
cus...@google.com
on 2 Apr 2014 at 3:20