Use of uninitialized variables in lambdas / object literals / local functions is forbidden now #KT-4475 Fixed
Local declarations CFA: variable initialization information before them is now taken into account
This commit is contained in:
@@ -3,7 +3,7 @@ fun foo(<!UNRESOLVED_REFERENCE!>@varargs<!> <!UNUSED_PARAMETER!>f<!> : Int) {}
|
||||
var bar : Int = 1
|
||||
set(<!UNRESOLVED_REFERENCE!>@varargs<!> v) {}
|
||||
|
||||
val x : (Int) -> Int = {<!UNRESOLVED_REFERENCE!>@varargs<!> <!TYPE_MISMATCH!>x<!> <!SYNTAX!>: Int -> x<!>}
|
||||
val x : (Int) -> Int = {<!UNRESOLVED_REFERENCE!>@varargs<!> <!TYPE_MISMATCH, UNINITIALIZED_VARIABLE!>x<!> <!SYNTAX!>: Int -> x<!>}
|
||||
|
||||
class Hello(<!UNRESOLVED_REFERENCE!>@varargs<!> <!UNUSED_PARAMETER!>args<!>: Any) {
|
||||
}
|
||||
Reference in New Issue
Block a user