public void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
*/
+ public void testParserException_pr115788() { runTest("parser exception");}
public void testPossibleStaticImports_pr113066_1() { runTest("possible static imports bug - 1");}
public void testPossibleStaticImports_pr113066_2() { runTest("possible static imports bug - 2");}
public void testPossibleStaticImports_pr113066_3() { runTest("possible static imports bug - 3");}
<compile files="Consts.java,TestNPE.java" options="-1.5"/>
</ajc-test>
+ <ajc-test dir="bugs150/pr115788" title="parser exception">
+ <compile files="AAA.java">
+ <message kind="warning" line="3" text="no match for this type name: Screen"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs150/pr113066" title="possible static imports bug - 2">
<compile files="Consts2.java,TestNPE2.java" options="-1.5">
<message kind="error" line="2" text="The import a.Consts2.A_CONST cannot be resolved"/>
public Object visit(ThisOrTargetPointcut node, Object data) {
if ((m_isTarget && !node.isThis())
|| (!m_isTarget && node.isThis())) {
+ String pointcutString = node.getType().toString();
+ // see pr115788 "<nothing>" means there was a problem resolving types - that will be reported so dont blow up
+ // the parser here..
+ if (pointcutString.equals("<nothing>")) {
+ return new NoTypePattern();
+ }
//pertarget(target(Foo)) => Foo+ for type pattern matching
//perthis(this(Foo)) => Foo+ for type pattern matching
// TODO AV - we do like a deep copy by parsing it again.. quite dirty, would need a clean deep copy
- TypePattern copy = new PatternParser(node.getType().toString().replace('$', '.')).parseTypePattern();
+ TypePattern copy = new PatternParser(pointcutString.replace('$', '.')).parseTypePattern();
// TODO AV - see dirty replace from $ to . here as inner classes are with $ instead (#108488)
copy.includeSubtypes = true;
return copy;