Fix for KT-9140: Default parameters are passed as nulls when using indexing [ ] invocation
#KT-9140 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user