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.misc.feature.switch.expressions |
24 // key: compiler.misc.feature.switch.expressions |
25 // key: compiler.warn.preview.feature.use.plural |
25 // key: compiler.err.feature.not.supported.in.source.plural |
26 // options: --enable-preview -source ${jdk.version} -Xlint:preview |
26 // options: -Xlint:-options -source 13 |
27 |
27 |
28 class SwitchExpressions { |
28 class SwitchExpressions { |
29 int m(int i) { |
29 int m(int i) { |
30 return switch (i) { |
30 return switch (i) { |
31 default: yield -1; |
31 default: yield -1; |