--- /dev/null
+import java.lang.reflect.Method;
+import java.util.*;
+
+interface Super<R extends Number> {
+}
+
+aspect X {
+ private T Super<T>.getterA;
+}
+
+
+public class Bridged implements Super<Integer> {
+
+ // Print BRIDGE status of all getter* methods
+ public static void main(String[] argv) {
+ Method[] ms = Bridged.class.getMethods();
+ List results = new ArrayList();
+ for (int i = 0; i < ms.length; i++) {
+ if (ms[i].getName().indexOf("getter")!=-1) {
+
+results.add(ms[i].getName()+"()"+ms[i].getReturnType().getName()+ " isBridged?"+((ms[i].getModifiers() & 0x0040) != 0));
+ }
+ }
+ Collections.sort(results);
+ for (Iterator iterator = results.iterator(); iterator.hasNext();) {
+ String entry = (String) iterator.next();
+ System.out.println(entry);
+ }
+ }
+}
+
runTest("bridge methods for generic itds");
}
+ public void testGenericFieldBridging_pr252285() {
+ runTest("bridge methods for generic itd fields");
+ }
+
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc163Tests.class);
}
</stdout>
</run>
</ajc-test>
+
+ <ajc-test dir="bugs163/pr252285" title="bridge methods for generic itd fields">
+ <compile files="Bridged.java" options="-1.5"/>
+ <run class="Bridged">
+ <stdout>
+ <line text="ajc$interFieldGet$X$Super$getterA()java.lang.Integer isBridged?false"/>
+ <line text="ajc$interFieldGet$X$Super$getterA()java.lang.Number isBridged?true"/>
+ <line text="ajc$interFieldSet$X$Super$getterA()void isBridged?false"/>
+ <line text="ajc$interFieldSet$X$Super$getterA()void isBridged?true"/>
+ </stdout>
+ </run>
+ </ajc-test>
</suite>
\ No newline at end of file