| 1 |
These two classes illustrate dependencies between different |
| 2 |
compilation units. |
| 3 |
As of 09/06/2011 these generated two different exceptions in the |
| 4 |
compiler. |
| 5 |
Both of those are fixed, but we should investigate further whether all |
| 6 |
similar cases are correctly handled now. TODO! |
| 7 |
|
| 8 |
If the two classes are compiled individually or in the superclass then |
| 9 |
subclass order: |
| 10 |
|
| 11 |
javac -processor org.checkerframework.checker.nullness.NullnessChecker Bug109_A.java Bug109_B.java |
| 12 |
|
| 13 |
everything works as expected. |
| 14 |
If they are compiled in the subclass then superclass order: |
| 15 |
|
| 16 |
javac -processor org.checkerframework.checker.nullness.NullnessChecker Bug109_B.java Bug109_A.java |
| 17 |
|
| 18 |
the compiler used to throw exceptions. |
| 19 |
These two problems are now fixed. |
| 20 |
The problem was that AnnotatedTypeFactory.getAnnotatedType looks at a |
| 21 |
field initializer to determine its type. When the field was in a |
| 22 |
different class, this lead to a call of getPath with a tree in a |
| 23 |
different compilation unit, which cannot be handled. |
| 24 |
We now conservatively return null sooner. |