ctolkmit / checker-framework

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

Checker framework crashes on missing import #346

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Run any checker (reproduced on the Nullness and Regex so far) on the 
following code:

class Generic<T> {}

class Context {

    List<? extends Object> example;
}
Note that "import java.util.List;" is missing.

What is the expected output? 
/Users/jburke/Documents/tmp/Wildcard2.java:5: error: cannot find symbol
    List<? extends Object> example;
    ^
  symbol:   class List
  location: class Context
1 error

What do you see instead?  
The correct error message followed by a stack trace.

error: AnnotatedTypeMirror.createType: input should type-check already! Found 
error type: <any>
  Compilation unit: /Users/jburke/Documents/tmp/Wildcard2.java
  Exception: java.lang.Throwable; Stack trace: org.checkerframework.framework.source.SourceChecker.errorAbort(SourceChecker.java:594)
  org.checkerframework.javacutil.ErrorReporter.errorAbort(ErrorReporter.java:28)
  ... rest of stacktrace is attached

Original issue reported on code.google.com by Jonathan...@gmail.com on 13 Aug 2014 at 10:13

Attachments:

GoogleCodeExporter commented 9 years ago
I further simplified the test case and added it in 
framework/tests/framework/Issue346.java.
I've refactored the interaction between annotation processors and type visitors.

Original comment by wdi...@gmail.com on 15 Aug 2014 at 4:27

GoogleCodeExporter commented 9 years ago

Original comment by jtha...@cs.washington.edu on 30 Aug 2014 at 12:15