biddyweb / checker-framework

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

Exception when @InheritedAnnotation used on annotation with argument #380

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Gist 
https://gist.github.com/kubabogaczewicz/f77de4d1d082e39a08d2/aa3e05624db1d31571d
33fa8a74e9e5c57b9c2e2 provides a showcase for the issue

2. Try to compile this gist (with files in correct packages)

$ javac -processor org.checkerframework.checker.nullness.NullnessChecker 
org/rdprojekt/bugs/checker/B.java

3. Compiler fails with error:
An exception has occurred in the compiler (1.8.0-jsr308-1.8.8). Please report 
this bug so we can fix it.  For instructions, see 
https://jsr308-langtools.googlecode.com/hg/doc/README-jsr308.html#reporting-bugs
 .  Thank you.
java.lang.AssertionError: writePool true
    at com.sun.tools.javac.util.Assert.error(Assert.java:133)
    at com.sun.tools.javac.jvm.ClassWriter.writePool(ClassWriter.java:483)
    at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1757)

I would expect a successfull compilation, maybe a warning about nullness, but 
not compiler assertion error.

Diagnostics:
$ javac -version
javac 1.8.0-jsr308-1.8.8

$ uname -a
Linux kuba-ubuntu-vb 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 
2014 x86_64 x86_64 x86_64 GNU/Linux

After removing @EnsureNonNullIf from A.java compiler finished without assertion 
errors.

Original issue reported on code.google.com by kuba.bogaczewicz@gmail.com on 1 Dec 2014 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by wdi...@gmail.com on 1 Dec 2014 at 5:35

GoogleCodeExporter commented 9 years ago
This seems to be an issue with inheriting annotations. A minimized test case:
- put the three attached files somewhere
- compile Decl and DA, no processor required:

checker/bin/javac Decl.java DA.java

- compile DB with _any_ processor:

checker/bin/javac -processor NullnessChecker DB.java

The result is the same AssertionError.

I wasn't able to reproduce the error without @InheritedAnnotation or without an 
argument to the annotation.

Suzanne, Paulo, can one of you look at a fix? I didn't add the original or this 
test case into the repository.

Original comment by wdi...@gmail.com on 2 Dec 2014 at 3:01

GoogleCodeExporter commented 9 years ago
I'll deal with this bug but  It appears you forgot to attach the files.

Original comment by smil...@cs.washington.edu on 2 Dec 2014 at 5:37

GoogleCodeExporter commented 9 years ago
Let me try again, I'm sure I had the files there yesterday...

Original comment by wdi...@gmail.com on 2 Dec 2014 at 6:16

Attachments:

GoogleCodeExporter commented 9 years ago
Got them.  Thanks!

Original comment by smil...@cs.washington.edu on 2 Dec 2014 at 6:17

GoogleCodeExporter commented 9 years ago
This has been fixed: 
https://code.google.com/p/checker-framework/source/detail?r=99cd9046f23e and 
will appear in the December release.

Thanks for the bug report!

Original comment by Suzanne....@gmail.com on 3 Dec 2014 at 5:56

GoogleCodeExporter commented 9 years ago

Original comment by jtha...@cs.washington.edu on 20 Dec 2014 at 2:16