Delegated Properties: Analysis adjustments for local delegated properties support

This commit is contained in:
Dotlin
2016-02-07 17:43:15 +03:00
committed by Mikhael Bogdanov
parent 9bfb226948
commit fa523b9af4
32 changed files with 423 additions and 88 deletions
@@ -0,0 +1,20 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int {
return 1
}
}
val a: Int <!SCRIPT_TOP_LEVEL_LOCAL_VARIABLE_WITH_DELEGATE!>by Delegate()<!>
class Foo {
val a: Int by Delegate()
}
fun foo() {
val a: Int by Delegate()
}