Use 'DefaultImpls' as owner for interface local delegated properties
#KT-19690 Fixed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user