JS: fix exception during translation of for expression with iterator having generic type constrained by Iterable. Fix #KT-8385

This commit is contained in:
Alexey Andreev
2016-09-30 16:30:43 +03:00
parent 977fd8f591
commit 61b429f2f0
3 changed files with 21 additions and 12 deletions
@@ -0,0 +1,8 @@
public fun <T, C : Collection<T>> bar(collection: C, f: (T) -> Unit) { for (item in collection) f(item) }
fun box(): String {
val collection = listOf("O", "K")
var result = ""
bar(collection) { result += it }
return result
}