mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
switch expressions 2.0: expected type by yield
GitOrigin-RevId: f4e396ddc90d66790db044525611c536c3f620fa
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7e9aad77c7
commit
24d1d27b1e
@@ -4,7 +4,7 @@ class Foo {
|
||||
return switch (i) {
|
||||
default -> {
|
||||
String foo;
|
||||
break foo;
|
||||
yield foo;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -4,7 +4,7 @@ class Foo {
|
||||
int foo;
|
||||
return switch (foo) {
|
||||
default -> {
|
||||
break i;
|
||||
yield i;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,7 @@ class Foo {
|
||||
int x = foo ? 0 : switch(1) {
|
||||
default -> {
|
||||
boolean foo;
|
||||
break foo;
|
||||
yield foo;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,7 @@ class Foo {
|
||||
String test(int i) {
|
||||
return switch (i) {
|
||||
default -> {
|
||||
break fo<caret>o;
|
||||
yield fo<caret>o;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,7 @@ class Foo {
|
||||
String test(int i) {
|
||||
return switch (f<caret>oo) {
|
||||
default -> {
|
||||
break i;
|
||||
yield i;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
class Foo {
|
||||
int x = foo ? 0 : switch(1) {
|
||||
default -> {
|
||||
break f<caret>oo;
|
||||
yield f<caret>oo;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user