lovubuntu / checker-framework

Automatically exported from code.google.com/p/checker-framework
0 stars 0 forks source link

Scaring message when using the checker with recursive types #358

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the Nullness Checker on the following program
public class FooBar<E extends FooBar<E>> {
    final E test = null;
}

What is the expected output? What do you see instead?
Expected: incompatible types in assignment. final E test = null; found : null 
required: @Initialized @NonNull E

Actual: incompatible types in assignment. final E test = null; found : null 
required: E extends @Initialized @NonNull FooBar<E extends @Initialized 
@NonNull FooBar<E extends @Initialized @NonNull FooBar<E extends 
 @Initialized @NonNull FooBar<E>>>>

What version of the product are you using? On what operating system?
1.8.5

Original issue reported on code.google.com by ClovisSe...@gmail.com on 24 Sep 2014 at 11:35

GoogleCodeExporter commented 9 years ago
Thanks for the report!
We're currently refactoring how type variables are handled, which will also 
address such recursive types.
Jonathan, can you see how this example looks in the hacks repo?

Original comment by wdi...@gmail.com on 24 Sep 2014 at 11:42