Files
kotlin-fork/compiler/testData/diagnostics/tests/script/topLevelVariable.fir.kts
T
Ilya Chernikov 47448d779c K2 Scripting: enable script diagnostic tests for FIR
also add script scopes test
2022-11-26 18:01:49 +00:00

21 lines
422 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int {
return 1
}
}
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
class Foo {
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
}
fun foo() {
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>Delegate()<!>
}