Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2019-03-11 16:32:19 +0000
committerManoj Palat2019-03-13 05:24:30 +0000
commit27bd552dc69e5f85a45a8046d2287ad5a183fcfc (patch)
tree57447109cfdc2d0726af0fe7fcbd7586b4032f55 /org.eclipse.jdt.core.tests.compiler/src
parent5ddf55f55ca67103310e86b77ee14683b0256bb9 (diff)
downloadeclipse.jdt.core-27bd552dc69e5f85a45a8046d2287ad5a183fcfc.tar.gz
eclipse.jdt.core-27bd552dc69e5f85a45a8046d2287ad5a183fcfc.tar.xz
eclipse.jdt.core-27bd552dc69e5f85a45a8046d2287ad5a183fcfc.zip
Bug 545255 - [12] AIOOBE inY20190313-0215
org.eclipse.jdt.internal.compiler.codegen.CodeStream.lookupswitch Change-Id: Ifb57257dfb0656b13c4354819282556f6996129a
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
index b3cf79860e..6f4e3fbbdc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchExpressionTest.java
@@ -2182,4 +2182,28 @@ public class SwitchExpressionTest extends AbstractRegressionTest {
null,
new String[] {"--enable-preview"});
}
+ public void testBug545255_01() {
+ runConformTest(
+ new String[] {
+ "X.java",
+ "public class X {\n"+
+ " public static void foo (int i) {\n"+
+ " int v = switch (i) {\n"+
+ " case 60, 600: break 6;\n"+
+ " case 70: break 7;\n"+
+ " case 80: break 8;\n"+
+ " case 90, 900: break 9;\n"+
+ " default: break 0;\n"+
+ " };\n"+
+ " System.out.println(v);\n"+
+ " }\n"+
+ " public static void main(String[] args) {\n"+
+ " X.foo(10);\n"+
+ " }\n"+
+ "}\n"
+ },
+ "0",
+ null,
+ new String[] {"--enable-preview"});
+ }
} \ No newline at end of file

Back to the top