--- /dev/null
+package pkg;
+
+public class A {
+
+}
+
+aspect X {
+ declare warning: staticinitialization(*) && if(!thisEnclosingJoinPoint.toString().equals("abc")): "Foobar {joinpoint}";
+ // before(): staticinitialization(*) && if(!thisEnclosingJoinPointStaticPart.getPackage().equals(thisJoinPoint.getPackage())) {}
+ //declare warning: staticinitialization(*) && if(true): "Foobar {joinpoint}";
+}
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ //public void testStaticallyAnalyzableIf_292262_1() {
+ // runTest("if with statically recognizable code");
+ //}
+
public void testTypePatternCategories_44365_Class() {
runTest("type category type patterns - class");
}
<suite>
+ <ajc-test dir="bugs169/pr292262" title="if with statically recognizable code">
+ <compile files="A.java">
+ <message kind="weave" text="Join point 'staticinitialization(void SimpleClass.<clinit>())' in Type 'SimpleClass'"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr44365" title="type category type patterns - class">
<compile files="SimpleClass.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'staticinitialization(void SimpleClass.<clinit>())' in Type 'SimpleClass'"/>