lvti: reject initializing var with void (IDEA-188623)

This commit is contained in:
Anna.Kozlova
2018-03-20 19:55:24 +01:00
parent ba3eb90b09
commit 924e032bbf
2 changed files with 8 additions and 0 deletions
@@ -33,6 +33,8 @@ class Main {
var runnable = true ? <error descr="Lambda expression not expected here">() -> {}</error> : <error descr="Lambda expression not expected here">() -> {}</error>;
Function<String, String> f1 = (<error descr="Cannot resolve symbol 'var'">var</error> var) -> var;
<error descr="Cannot infer type: variable initializer is 'void'">var</error> h = localVariableDeclaration();
}
private void forEachType(String[] strs, Iterable<String> it, Iterable raw) {