JS: fix exception during translation of for expression with iterator having generic type constrained by Iterable. Fix #KT-8385
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user