Test for Bugzilla Bug 59397

NPE in compiler when using (an unusual) declare warning against a ctor ITD
This commit is contained in:
aclement 2004-04-26 09:48:34 +00:00
parent 5a3430cbce
commit 591e8fd6d2
2 ha cambiato i file con 24 aggiunte e 0 eliminazioni

Vedi File

@ -7666,4 +7666,12 @@
</compile>
</ajc-test>
<ajc-test dir="bugs"
pr="59397"
title="NPE in compiler when using (an unusual) declare warning against a ctor ITD">
<compile files="DecwInitializationITD.java">
<message kind="warning" line="16"/>
</compile>
</ajc-test>
</suite>

Vedi File

@ -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 {}