mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
switch expression: correct enhanced old-style result expression calculus
IDEA-CR-40239
This commit is contained in:
+8
@@ -90,6 +90,14 @@ no instance(s) of type variable(s) exist so that Integer conforms to String">()
|
||||
break 1;
|
||||
};
|
||||
}
|
||||
case 1:
|
||||
if (i > 3) break <error descr="Bad type in switch expression: int cannot be converted to java.lang.String">3</error>;
|
||||
case 0:
|
||||
try {
|
||||
break <error descr="Bad type in switch expression: int cannot be converted to java.lang.String">42</error>;
|
||||
} finally {
|
||||
//do nothing
|
||||
}
|
||||
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