mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
switch expression: support old syntax without braces
IDEA-CR-40239
This commit is contained in:
+16
@@ -79,5 +79,21 @@ no instance(s) of type variable(s) exist so that Integer conforms to String">()
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
String s3 = switch (0) {
|
||||
default: {
|
||||
break switch (1) {
|
||||
case 2: {
|
||||
System.out.println();
|
||||
int inside_switch = switch (8) {
|
||||
default:
|
||||
break 1;
|
||||
};
|
||||
}
|
||||
default:
|
||||
break <error descr="Bad type in switch expression: int cannot be converted to java.lang.String">1</error>;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user