tests: Update external tests (1.1.2-dev-393)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
var result = "fail"
|
||||
|
||||
private operator fun X.get(name: String) = name + "K"
|
||||
private operator fun X.set(name: String, v: String) {
|
||||
result = v
|
||||
}
|
||||
|
||||
class X {
|
||||
fun test() : String {
|
||||
if (this["O"] != "OK") return "fail 1: ${this["O"]}"
|
||||
|
||||
this["O"] += "K"
|
||||
if (result != "OKK") return "fail 2: ${result}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return X().test()
|
||||
}
|
||||
Reference in New Issue
Block a user