aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authoraclement <aclement>2004-04-26 09:48:34 +0000
committeraclement <aclement>2004-04-26 09:48:34 +0000
commit591e8fd6d22f308af87ed766884e4e5e8ceaba09 (patch)
tree205e33c798c9a90685cb5e61ce1e4e12e17c688f /tests/bugs
parent5a3430cbce20dea4de5e4162b2fd3378919d5541 (diff)
downloadaspectj-591e8fd6d22f308af87ed766884e4e5e8ceaba09.tar.gz
aspectj-591e8fd6d22f308af87ed766884e4e5e8ceaba09.zip
Test for Bugzilla Bug 59397
NPE in compiler when using (an unusual) declare warning against a ctor ITD
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/DecwInitializationITD.java16
1 files changed, 16 insertions, 0 deletions
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 {}