JoG-Dev / checker-framework

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

Nullness-checker: Wrong required type for method of nested generic class in concrete specialisation #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Compiling and nullness checking the attached source results an error "found: 
String required: T extends Object".

Expected that the checker would infer String as the type (javac infers the type 
correctly).

Commandline:
~/tmp/checker-framework/checkers/binary/javac -version -verbose 
-AprintErrorStack -processor checkers.nullness.NullnessChecker 
scratch2/Scratch3.java 2>&1 | tee ~/tmp/output.txt

Attached is the output it produced

Checker-framework version: 1.6.2 (in versions 1.4.0, 1.4.4 (from Maven 
dependency), and 1.6.0 (from Maven dependency) all produce same behaviour)

JDK version: 1.7.0 (as supplied with checker-framework)

Original issue reported on code.google.com by kaspervd...@gmail.com on 27 Apr 2013 at 7:02

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the bug report!  I agree that this behavior is incorrect.  I have 
added a new test case, checkers/tests/nullness/generics/InferMethod.java, on 
the dff branch.  I regret that no fix will be ready by the May 1 release of the 
Checker Framework.

Original comment by michael.ernst@gmail.com on 1 May 2013 at 3:01