equal
deleted
inserted
replaced
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 // key: compiler.err.break.outside.switch.expression |
24 // key: compiler.err.break.outside.switch.expression |
25 // key: compiler.note.preview.filename |
|
26 // key: compiler.note.preview.recompile |
|
27 // options: --enable-preview -source ${jdk.version} |
|
28 |
25 |
29 class BreakOutsideSwitchExpression { |
26 class BreakOutsideSwitchExpression { |
30 int t(int i) { |
27 int t(int i) { |
31 OUT: while (true) { |
28 OUT: while (true) { |
32 return switch (i) { |
29 return switch (i) { |