mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
switch expression: fix typo in type calculation (IDEA-204188)
This commit is contained in:
+10
@@ -108,4 +108,14 @@ no instance(s) of type variable(s) exist so that Integer conforms to String">()
|
||||
default -> throw new IllegalArgumentException();
|
||||
};
|
||||
}
|
||||
|
||||
static void test(boolean b, int i) {
|
||||
Class<?> c = (b ?
|
||||
switch (i) {
|
||||
case 1 -> true;
|
||||
default -> 0;
|
||||
} : 1).getClass();
|
||||
|
||||
System.out.println(c.getCanonicalName());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user