aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr108104.aj
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-26 10:50:22 +0000
committeracolyer <acolyer>2005-08-26 10:50:22 +0000
commitefb3c54464efbcffdf82311e63b10eeeef4f349b (patch)
treeb732eda2d8f495e0d95b8a7f8a7cd97a5d424c38 /tests/bugs150/pr108104.aj
parent100d9e056735e85610fe9072527a0369dc867ec5 (diff)
downloadaspectj-efb3c54464efbcffdf82311e63b10eeeef4f349b.tar.gz
aspectj-efb3c54464efbcffdf82311e63b10eeeef4f349b.zip
tests for pr108104
Diffstat (limited to 'tests/bugs150/pr108104.aj')
-rw-r--r--tests/bugs150/pr108104.aj31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs150/pr108104.aj b/tests/bugs150/pr108104.aj
new file mode 100644
index 000000000..e4929c6d1
--- /dev/null
+++ b/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!
+ }
+} \ No newline at end of file