Use 'DefaultImpls' as owner for interface local delegated properties

#KT-19690 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-08-16 16:35:31 +02:00
parent 905b8cc4e9
commit 97d46e76f5
7 changed files with 59 additions and 11 deletions
@@ -0,0 +1,17 @@
//WITH_REFLECT
import kotlin.properties.Delegates
interface MyInterface {
fun something(): String {
var foo: String by Delegates.notNull();
foo = "OK"
return foo
}
}
fun box(): String {
return object : MyInterface {
}.something()
}