Skip to content

Commit d060245

Browse files
run.javac improvements:
+ more documentation for JavacHasABug.JavacBug6573446 + new constant JavacHasABug.JavacBugIvarInterning + new constant JavacHasABug.JavacBug8297428 At this point GenericsRegressionTest_9 is ready to opt in to this mode
1 parent cda5743 commit d060245

2 files changed

Lines changed: 30 additions & 5 deletions

File tree

org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,8 @@ Excuse excuseFor(JavacCompiler compiler) {
11541154
new JavacHasABug(
11551155
MismatchType.EclipseErrorsJavacNone),
11561156
JavacBug6573446 = // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6573446 & https://bugs.eclipse.org/bugs/show_bug.cgi?id=190945
1157+
// updated link https://bugs.openjdk.org/browse/JDK-6573446
1158+
// see also confirmation https://mail.openjdk.org/archives/list/compiler-dev@openjdk.org/thread/TLIVNI7SPUVX646O7RTGG7IOYJVWSV47/
11571159
new JavacHasABug(
11581160
MismatchType.EclipseErrorsJavacNone),
11591161
JavacBug6575821 = // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6575821
@@ -1193,7 +1195,11 @@ Excuse excuseFor(JavacCompiler compiler) {
11931195
JavacBug8016196 = // https://bugs.openjdk.org/browse/JDK-8016196
11941196
new JavacHasABug(MismatchType.JavacErrorsEclipseNone),
11951197
JavacBug8016207 = // https://bugs.openjdk.org/browse/JDK-8016207 Widening of capture vars occurs at unspecified times
1196-
new JavacHasABug(MismatchType.EclipseErrorsJavacNone);
1198+
new JavacHasABug(MismatchType.EclipseErrorsJavacNone),
1199+
JavacBugIvarInterning = // https://mail.openjdk.org/pipermail/compiler-dev/2025-October/031866.html
1200+
new JavacHasABug(MismatchType.JavacErrorsEclipseNone),
1201+
JavacBug8297428 = // https://bugs.openjdk.org/browse/JDK-8297428
1202+
new JavacHasABug(MismatchType.JavacErrorsEclipseNone);
11971203

11981204
// bugs that have been fixed but that we've not identified
11991205
public static JavacHasABug

org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_9.java

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ public static Test suite() {
3838
return buildMinimalComplianceTestSuite(testClass(), F_9);
3939
}
4040

41+
// ========= OPT-IN to run.javac mode: ===========
42+
@Override
43+
protected void setUp() throws Exception {
44+
this.runJavacOptIn = true;
45+
super.setUp();
46+
}
47+
@Override
48+
protected void tearDown() throws Exception {
49+
super.tearDown();
50+
this.runJavacOptIn = false; // do it last, so super can still clean up
51+
}
52+
// =================================================
53+
4154
// vanilla test case
4255
public void testBug488663_001() {
4356
this.runConformTest(
@@ -1139,7 +1152,8 @@ public static <T> IQuery<T> createCompoundQuery(Collection<? extends List<? exte
11391152
});
11401153
}
11411154
public void testGH3948() {
1142-
runConformTest(new String[] {
1155+
Runner runner = new Runner();
1156+
runner.testFiles = new String[] {
11431157
"Foo.java",
11441158
"""
11451159
import java.util.Collections;
@@ -1169,7 +1183,9 @@ public static <U> void test(Function<Foo, List<U>> getter, BiConsumer<Foo, List<
11691183
public static interface Bar{}
11701184
}
11711185
"""
1172-
});
1186+
};
1187+
runner.javacTestOptions = JavacHasABug.JavacBug8297428;
1188+
runner.runConformTest();
11731189
}
11741190
public void testGH4022a() {
11751191
runConformTest(new String[] {
@@ -1254,7 +1270,8 @@ public static void main(String[] args) {
12541270
});
12551271
}
12561272
public void testGH4039() {
1257-
runConformTest(new String[] {
1273+
Runner runner = new Runner();
1274+
runner.testFiles = new String[] {
12581275
"CollectionsSortReproducer.java",
12591276
"""
12601277
import java.util.Collection;
@@ -1274,7 +1291,9 @@ public static void main(String[] args) {
12741291
}
12751292
}
12761293
"""
1277-
});
1294+
};
1295+
runner.javacTestOptions = JavacHasABug.JavacBugIvarInterning;
1296+
runner.runConformTest();
12781297
}
12791298

12801299
public void testGH4003() {

0 commit comments

Comments
 (0)