diff options
author | acolyer <acolyer> | 2004-08-18 08:25:46 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-08-18 08:25:46 +0000 |
commit | 7fd50c75ae779195b87922c5ffd839ac7a6910bf (patch) | |
tree | ef161539e5d9ad7154c3a2ae97db270ab16e73c4 /tests | |
parent | 5d2c29e5769f11763514a173690c290f3111e64b (diff) | |
download | aspectj-7fd50c75ae779195b87922c5ffd839ac7a6910bf.tar.gz aspectj-7fd50c75ae779195b87922c5ffd839ac7a6910bf.zip |
test for Bugzilla Bug 64069
ITD name clashes with private members
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/PR64069.aj | 43 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java | 5 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml | 10 |
3 files changed, 58 insertions, 0 deletions
diff --git a/tests/bugs/PR64069.aj b/tests/bugs/PR64069.aj new file mode 100644 index 000000000..a83041b17 --- /dev/null +++ b/tests/bugs/PR64069.aj @@ -0,0 +1,43 @@ + + +aspect Aspect { + + public A.new() { // CE L5 + super(); + System.out.println("ITD A()"); + } + + public void A.bar() { // CE L10 + System.out.println("ITD bar"); + } + + public int A.x; // CE L14 + +} + +class A { + + void foo() { + A a = new A(); + bar(); + } + + private int x; + + private A() { + super(); + System.out.println("private A()"); + } + + private void bar() { + System.out.println("private bar"); + } + +} + +public class PR64069 { + + static public void main(String[] args) { + new A().foo(); + } +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java index ec5513053..6127997d2 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java @@ -234,5 +234,10 @@ public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase { assertTrue("Output should contain 'CAUSE=org.aspectj.lang.NoAspectBoundException' but is '"+s+"'", s.indexOf("CAUSE=org.aspectj.lang.NoAspectBoundException")!=-1); } + + public void test044_ITDnameClashes() { + runTest("ITD name clashes with private members"); + } + } diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml index 1ef453ef8..e6f71c3c0 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -335,3 +335,13 @@ <compile files="pr62642.java"/> <run class="pr62642"/> </ajc-test> + + <ajc-test dir="bugs" pr="64069" + title="ITD name clashes with private members"> + <compile files="PR64069.aj"> + <message kind="error" line="5" text="conflicts with existing member"/> + <message kind="error" line="10" text="conflicts with existing member"/> + <message kind="error" line="14" text="conflicts with existing member"/> + </compile> + </ajc-test> + |