mirror da
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-28 17:57:06 +02:00
Test for Bugzilla Bug 59397
NPE in compiler when using (an unusual) declare warning against a ctor ITD
This commit is contained in:
parent
5a3430cbce
commit
591e8fd6d2
@ -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>
|
||||
|
16
tests/bugs/DecwInitializationITD.java
Normal file
16
tests/bugs/DecwInitializationITD.java
Normal 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 {}
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user