瀏覽代碼

tests for pr108104

tags/V1_5_0M3a
acolyer 19 年之前
父節點
當前提交
efb3c54464

+ 31
- 0
tests/bugs150/pr108104.aj 查看文件

@@ -0,0 +1,31 @@
class Bug_Provider {
public void enable_bug(Object argument) {}
}

class Bug_Checker<T> extends Bug_Provider {
public T is_bug_enabled() {
return (T) new Boolean(true);
}
}

public class pr108104 {
public static void main(String[] args) throws InterruptedException {
final Bug_Checker<Boolean> first = new Bug_Checker<Boolean>() {
@Override // compiler agrees, this is an override
public Boolean is_bug_enabled() {
return new Boolean(false);
}
};
System.out.println("is bug enabled? " + first.is_bug_enabled()); // false

first.enable_bug(null);
final Bug_Checker<Boolean> second = new Bug_Checker<Boolean>() {
@Override
public Boolean is_bug_enabled() {
return new Boolean(false);
}
};
System.out.println("is bug enabled? " +second.is_bug_enabled()); // true!
}
}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java 查看文件

@@ -282,6 +282,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("matching against Object[]");
}
public void testMultipleAnonymousInnerClasses_pr108104() {
runTest("multiple anonymous inner classes 2");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

+ 5
- 0
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml 查看文件

@@ -132,6 +132,11 @@
<message kind="error" line="4" text="wildcard type pattern not allowed"></message>
</compile>
</ajc-test>
<ajc-test dir="bugs150" pr="108104" title="multiple anonymous inner classes 2">
<compile files="pr108104.aj" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="bugs150/pr106130" pr="106130" title="test weaving with > 256 locals">
<compile files="AroundLotsOfVars.java LotsOfVars.java" options="-preserveAllLocals"/>

Loading…
取消
儲存