Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt
T
2015-07-10 15:05:07 +03:00

10 lines
163 B
Kotlin
Vendored

// !CHECK_TYPE
fun <T> bar(f: () -> T) : T = f()
fun test(map: MutableMap<Int, Int>) {
val r = bar {
map[1] = 2
}
r checkType { _<Unit>() }
}