Local delegated properties moved to language feature option

This commit is contained in:
Mikhael Bogdanov
2016-05-30 12:39:19 +03:00
parent 2bd807bb4e
commit bdc0b6b308
8 changed files with 99 additions and 8 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: -LocalDelegatedProperties
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
fun foo(): Int {
val prop: Int <!LOCAL_VARIABLE_WITH_DELEGATE!>by Delegate()<!>
val prop2: Int <!LOCAL_VARIABLE_WITH_DELEGATE!>by <!DELEGATE_SPECIAL_FUNCTION_MISSING!>123<!><!>
return prop + prop2
}