mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8205393: Add SourceVersion.RELEASE_13 8205394: Add source 13 and target 13 to javac 8205645: Bump maximum recognized class file version to 57 for JDK 13 8214825: Update preview language features for start of JDK 13 Reviewed-by: erikj, alanb, mchung, mcimadamore, dholmes, smarks, jjg
33 lines
768 B
Java
33 lines
768 B
Java
/*
|
|
* @test /nodymaticcopyright/
|
|
* @bug 8206986
|
|
* @summary Verify reasonable errors are produced when neither ':' nor '->'
|
|
* is found are the expression of a case
|
|
* @compile/fail/ref=SwitchArrowBrokenConstant.out -source 13 --enable-preview -Xlint:-preview -XDrawDiagnostics SwitchArrowBrokenConstant.java
|
|
*/
|
|
|
|
public class SwitchArrowBrokenConstant {
|
|
|
|
private String likeLambda(int i) {
|
|
switch (i) {
|
|
case (a, b) -> {}
|
|
}
|
|
return switch (i) {
|
|
case (a, b) -> {}
|
|
};
|
|
switch (i) {
|
|
case a;
|
|
}
|
|
return switch (i) {
|
|
case a;
|
|
};
|
|
switch (i) {
|
|
default ;
|
|
}
|
|
return switch (i) {
|
|
default ;
|
|
};
|
|
}
|
|
|
|
}
|