disable convert to functional in var context (IDEA-185038)

This commit is contained in:
Anna.Kozlova
2018-01-17 14:08:04 +01:00
parent 77d83d1255
commit de82603306
6 changed files with 27 additions and 6 deletions
@@ -29,7 +29,7 @@ class Main {
<error descr="Cannot infer type: lambda expression requires an explicit target type">var</error> f = () -> "hello";
<error descr="Cannot infer type: method reference requires an explicit target type">var</error> m = Main::localVariableDeclaration;
<error descr="Cannot infer type: variable initializer is 'null'">var</error> g = null;
var runnable = true ? <error descr="<lambda expression> is not a functional interface">() -> {}</error> : <error descr="<lambda expression> is not a functional interface">() -> {}</error>;
var runnable = true ? <error descr="Lambda expression not expected here">() -> {}</error> : <error descr="Lambda expression not expected here">() -> {}</error>;
}
private void forEachType(String[] strs, Iterable<String> it, Iterable raw) {