From: aclement Date: Mon, 26 Apr 2004 09:48:34 +0000 (+0000) Subject: Test for Bugzilla Bug 59397 X-Git-Tag: Root_ajdt_support~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=591e8fd6d22f308af87ed766884e4e5e8ceaba09;p=aspectj.git Test for Bugzilla Bug 59397 NPE in compiler when using (an unusual) declare warning against a ctor ITD --- diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 8588b59f3..efffb7547 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -7666,4 +7666,12 @@ + + + + + + diff --git a/tests/bugs/DecwInitializationITD.java b/tests/bugs/DecwInitializationITD.java new file mode 100644 index 000000000..26bab8b9e --- /dev/null +++ b/tests/bugs/DecwInitializationITD.java @@ -0,0 +1,16 @@ + +// The actual ctor that gets put in type 'HW' during compilation is +// HW(String,A) +// This is an artifact of the implementation of ctor ITDing - unfortunately this artifact +// can be seen by the declare warning. So, +// initialization(HW.new(..)) will match our new ctor +// initialization(HW.new(String,A)) will match our new ctor +// initialization(HW.new(String)) will not match ! + +aspect A { + HW.new(String s) {} + declare warning : initialization(HW.new(String,A)) : "Funky ctor found!"; +} + + +class HW {}