diff options
author | acolyer <acolyer> | 2005-03-22 13:14:44 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-03-22 13:14:44 +0000 |
commit | b5f4d09e4f4e45943c6c8b3dc8dca0c05b90f27c (patch) | |
tree | fd62ccc09921d51f4e59007ddf5205ff5df9f1dc /tests | |
parent | 8e275e3b934fd973ca04e358e994e50e9668b415 (diff) | |
download | aspectj-b5f4d09e4f4e45943c6c8b3dc8dca0c05b90f27c.tar.gz aspectj-b5f4d09e4f4e45943c6c8b3dc8dca0c05b90f27c.zip |
Fix for Bugzilla Bug 88652: an array type as the last parameter in a signature does not match on the varargs declared method
Diffstat (limited to 'tests')
-rw-r--r-- | tests/java5/varargs/Pr88652.aj | 20 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 7 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/java5/varargs/Pr88652.aj b/tests/java5/varargs/Pr88652.aj new file mode 100644 index 000000000..bd3141cca --- /dev/null +++ b/tests/java5/varargs/Pr88652.aj @@ -0,0 +1,20 @@ +public aspect Pr88652 { + + pointcut p(): call(Touple.new(..)); + + declare warning: p() : "should match"; + + public static void main(String[] args) { + Touple t = new Touple(new Object()); + Touple t2 = new Touple(new Object(),new Object()); + } +} + + +class Touple { + + public Touple(Object formulaHandle, Object... propositions) { + ; // empty + } + +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 3d75b53c7..bdcc31a41 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -141,6 +141,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("invalid cons syntax"); } + public void testVarargsInConsBug() { + runTest("varargs in constructor sig"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 84e1de484..67370847d 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -126,6 +126,13 @@ <compile files="Rainbow.java" options="-emacssym,-1.5"/> </ajc-test> + <ajc-test dir="java5/varargs" title="varargs in constructor sig" vm="1.5"> + <compile files="Pr88652.aj" options="-1.5"> + <message kind="warning" line="8" text="should match"/> + <message kind="warning" line="9" text="should match"/> + </compile> + </ajc-test> + <ajc-test dir="java5/annotations" title="invalid cons syntax" vm="1.5"> <compile files="SyntaxError.aj" options="-1.5"> <message kind="error" line="3" text="Syntax error on token "new", "method name (not constructor)" expected"/> |