Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locally-defined annotations represented incorrectly in extracted JAIFs #119

Open
dbrosoft opened this issue Apr 20, 2016 · 0 comments
Open
Labels
Milestone

Comments

@dbrosoft
Copy link
Contributor

class C {
    @java.lang.annotation.Target(java.lang.annotation.ElementType.CONSTRUCTOR)
    @interface A {}

    @A
    C() { throw new RuntimeException(); }
}

Save the code above as C.java; compile and extract annotations.

$ javac -g C.java
$ extract-annotations C.class

If the result, given below, is successfully inserted into a source file, it will generate a syntax error due to the use of @C$A in place of the expected @A.

package :
annotation @C$A: @java.lang.annotation.Target(value={CONSTRUCTOR})

package :
class C:

    method <init>()V: @C$A
        return:
@mernst mernst added the bug label Nov 30, 2017
@mernst mernst added this to the Medium milestone Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants