incompatible types: highlight parent call instead of lambda when the error isn't related to lambda (IDEA-218801)

GitOrigin-RevId: 17a2f1f62f7703930aa25a8cfd6dfd4a918e1fe7
This commit is contained in:
Anna.Kozlova
2019-10-10 08:50:12 +02:00
committed by intellij-monorepo-bot
parent 0edaac849d
commit 87deef960c
11 changed files with 15 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ class MyTest {
});
String s3 = foo(() -> switch (i) {default -> bar();});
String s4 = foo(() -> switch (i) {default -> { yield bar();}});
String s5 = foo(<error descr="Incompatible types. Found: 'java.lang.Integer', required: 'java.lang.String'">() -> switch (i) {default -> { yield 1;}}</error>);
String s5 = <error descr="Incompatible types. Found: 'java.lang.Integer', required: 'java.lang.String'">foo(() -> switch (i) {default -> { yield 1;}});</error>
String s6 = switch (i) {
case 1 -> <error descr="Bad type in switch expression: int cannot be converted to java.lang.String">2</error>;
default -> {