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

Add default class bound to be annotated even when interface bounds are present #98

Open
dbrosoft opened this issue Jul 17, 2015 · 0 comments
Labels
Milestone

Comments

@dbrosoft
Copy link
Contributor

In class C below, the specified bound on type variable T is an interface bound. In the JAIF format, to specify annotating the first interface bound of the (first) parameter, one uses bound 0&1. If, as in the JAIF below, one specifies bound 0&0, the default class bound java.lang.Object should be generated and annotated, but the insertion currently fails.

// source
public class C {
  public <T extends java.io.Serializable> void foo(T t) {
  }
}
// JAIF
package :
annotation @A: @java.lang.annotation.Target(value={TYPE_USE})
class C:
    method foo(Ljava/util/Serializable;)V:
        bound 0 & 0: @A

The expected result is as follows:

// goal
public class C {
  public <T extends java.lang.@A Object & java.io.Serializable> void foo(T t) {
  }
}

Tests BoundClassMultiple and BoundMethodMultiple have been corrected and disabled until there is a fix.

@dbrosoft dbrosoft self-assigned this Aug 18, 2015
@dbrosoft dbrosoft added bug and removed enhancement labels Aug 18, 2015
@mernst mernst added this to the Medium milestone Jan 10, 2016
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