diff options
author | acolyer <acolyer> | 2005-08-26 10:50:22 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-26 10:50:22 +0000 |
commit | efb3c54464efbcffdf82311e63b10eeeef4f349b (patch) | |
tree | b732eda2d8f495e0d95b8a7f8a7cd97a5d424c38 /tests/bugs150/pr108104.aj | |
parent | 100d9e056735e85610fe9072527a0369dc867ec5 (diff) | |
download | aspectj-efb3c54464efbcffdf82311e63b10eeeef4f349b.tar.gz aspectj-efb3c54464efbcffdf82311e63b10eeeef4f349b.zip |
tests for pr108104
Diffstat (limited to 'tests/bugs150/pr108104.aj')
-rw-r--r-- | tests/bugs150/pr108104.aj | 31 |
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 |