KT-950 wrong call to array-like setter with non-void return type

This commit is contained in:
Alex Tkachman
2012-01-10 15:36:33 +02:00
parent 8a9a591370
commit 5633f71edc
3 changed files with 24 additions and 2 deletions
@@ -0,0 +1,9 @@
import java.util.*
fun <K, V> Map<K, V>.set(k : K, v : V) = put(k, v)
fun box() : String {
val map = HashMap<String,String>()
map["239"] = "932"
return if(map["239"] == "932") "OK" else "fail"
}