From 506b84081b28a0a49c69bf0affa617d4dbc6012e Mon Sep 17 00:00:00 2001 From: Manoj Palat Date: Thu, 16 May 2019 11:54:26 +0530 Subject: Bug 545715 comment 25 - [12] Assignment analysis doesn't work in switch statement with -> Change-Id: I1f03d9bc91b6f8d2db9ca1655f4f3607ba6f63b5 --- .../jdt/core/tests/compiler/regression/NullAnnotationTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java index e850cdcb17..1ffab25200 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java @@ -10588,7 +10588,7 @@ public void testBug545715() { Map customOptions = getCompilerOptions(); customOptions.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED); customOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE); - runConformTestWithLibs( + runConformTest( new String[] { "X.java", "public class X {\n"+ @@ -10597,9 +10597,13 @@ public void testBug545715() { " break loop;\n"+ " }\n"+ " }\n"+ + " public static void main(String[] args) {\n"+ + " new X().f();\n"+ + " }\n"+ "}\n" }, - customOptions, - ""); + "", + customOptions, + new String[] {"--enable-preview"}); } } -- cgit v1.2.3