summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2004-03-05 10:50:50 +0000
committeraclement <aclement>2004-03-05 10:50:50 +0000
commitc79892369fa4225ee5eb71b42c96e289f2eb4fc9 (patch)
tree9d76e6caf15e5df9fdef0eab99971c8b656285db /tests
parent4b9195763cb06c5c3d0ce2a25f8e5b9f98446dc0 (diff)
downloadaspectj-c79892369fa4225ee5eb71b42c96e289f2eb4fc9.tar.gz
aspectj-c79892369fa4225ee5eb71b42c96e289f2eb4fc9.zip
Fix for Bugzilla Bug 50776
fail in compiling aspect with overriding method introduction with different throws clause
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml5
-rw-r--r--tests/bugs/IntertypeDifferentThrows.java17
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 35b7d15f9..df4451ee2 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -7262,5 +7262,10 @@
<message kind="warning" line="21" text="this affected type is not exposed"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="50776"
+ title="fail in compiling aspect with overriding method introduction with different throws clause ">
+ <compile files="IntertypeDifferentThrows.java" />
+ </ajc-test>
</suite>
diff --git a/tests/bugs/IntertypeDifferentThrows.java b/tests/bugs/IntertypeDifferentThrows.java
new file mode 100644
index 000000000..4aaaaf661
--- /dev/null
+++ b/tests/bugs/IntertypeDifferentThrows.java
@@ -0,0 +1,17 @@
+class A {
+ public A(){}
+ public void m() throws Exception{}
+}
+
+class B extends A {
+ public B(){}
+ public void some_code(){
+ m();
+ }
+}
+
+// B.m() introduced here does not throw 'Exception' so class B above
+// should compile OK!
+aspect C {
+ public void B.m(){}
+} \ No newline at end of file