You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform/StaticCompilationTests.java
+14-22
Original file line number
Diff line number
Diff line change
@@ -3682,17 +3682,13 @@ public void testCompileStatic9007or9043_enumConstToPrivate1() {
3682
3682
};
3683
3683
//@formatter:on
3684
3684
3685
-
if (!isAtLeastGroovy(40)) {
3686
-
runConformTest(sources, "", "groovy.lang.MissingPropertyException: No such property: name for class: E");
3687
-
} else {
3688
-
runNegativeTest(sources,
3689
-
"----------\n" +
3690
-
"1. ERROR in Main.groovy (at line 6)\n" +
3691
-
"\tprint E.ONE.name\n" +
3692
-
"\t ^^^^^^^^^^\n" +
3693
-
"Groovy:[Static type checking] - No such property: name for class: E\n" +
3694
-
"----------\n");
3695
-
}
3685
+
runNegativeTest(sources,
3686
+
"----------\n" +
3687
+
"1. ERROR in Main.groovy (at line 6)\n" +
3688
+
"\tprint E.ONE.name\n" +
3689
+
"\t ^^^^^^^^^^\n" +
3690
+
"Groovy:[Static type checking] - No such property: name for class: E\n" +
3691
+
"----------\n");
3696
3692
}
3697
3693
3698
3694
@Test
@@ -3711,17 +3707,13 @@ public void testCompileStatic9007or9043_enumConstToPrivate2() {
3711
3707
};
3712
3708
//@formatter:on
3713
3709
3714
-
if (!isAtLeastGroovy(40)) {
3715
-
runConformTest(sources, "", "groovy.lang.MissingPropertyException: No such property: ordinal for class: E");
3716
-
} else {
3717
-
runNegativeTest(sources,
3718
-
"----------\n" +
3719
-
"1. ERROR in Main.groovy (at line 6)\n" +
3720
-
"\tprint E.ONE.ordinal\n" +
3721
-
"\t ^^^^^^^^^^^^^\n" +
3722
-
"Groovy:[Static type checking] - No such property: ordinal for class: E\n" +
3723
-
"----------\n");
3724
-
}
3710
+
runNegativeTest(sources,
3711
+
"----------\n" +
3712
+
"1. ERROR in Main.groovy (at line 6)\n" +
3713
+
"\tprint E.ONE.ordinal\n" +
3714
+
"\t ^^^^^^^^^^^^^\n" +
3715
+
"Groovy:[Static type checking] - No such property: ordinal for class: E\n" +
if (expressionToStoreOn instanceof AttributeExpression) { // TODO: expand to include PropertyExpression
1859
1892
if (!accessible) {
1860
1893
addStaticTypeError("The field " + field.getDeclaringClass().getNameWithoutPackage() + "." + field.getName() + " is not accessible", expressionToStoreOn.getProperty());
0 commit comments