4c04ad2371
Before this commit, such descriptors have null owners, which causes problems when the getter of the owner property is called.
11 lines
248 B
Kotlin
Vendored
11 lines
248 B
Kotlin
Vendored
class X {
|
|
operator fun get(name: String, type: String = "none") = name + type
|
|
}
|
|
|
|
fun box(): String {
|
|
if (X().get("a") != "anone") return "fail 1: ${X().get("a")}"
|
|
|
|
if (X()["a"] != "anone") return "fail 2: ${X()["a"]}"
|
|
|
|
return "OK"
|
|
} |