[KT-4124] Fix some tests from common testData

This commit is contained in:
Alexey Andreev
2016-02-17 11:35:16 +03:00
parent f5786dd567
commit 9238afc439
26 changed files with 68 additions and 88 deletions
+13 -14
View File
@@ -1,18 +1,17 @@
// Enable for JS when it supports Java class library.
// TARGET_BACKEND: JVM
// BTW, this test does not seem relevant to real descsription of issue #KT-504
import java.util.HashMap
import java.io.*
package mult_constructors_3_bug
operator fun <K, V> MutableMap<K, V>.set(key : K, value : V) = put(key, value)
public open class Identifier() {
private var myNullable : Boolean = true
companion object {
open public fun init(isNullable : Boolean) : Identifier {
val id = Identifier()
id.myNullable = isNullable
return id
}
}
}
fun box() : String {
val commands : MutableMap<String, String> = HashMap()
commands["c1"] = "239"
if(commands["c1"] != "239") return "fail"
commands["c1"] += "932"
return if(commands["c1"] == "239932") "OK" else "fail"
Identifier.init(true)
return "OK"
}