Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
T
Mikhail Glukhikh fe13f39de9 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
2015-11-17 18:21:09 +03:00

9 lines
364 B
Kotlin
Vendored

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, UNINITIALIZED_VARIABLE!>x<!> <!SYNTAX!>: Int -> x<!>}
class Hello(<!UNRESOLVED_REFERENCE!>@varargs<!> <!UNUSED_PARAMETER!>args<!>: Any) {
}