Files
kotlin-fork/j2k/tests/testData/ast/tryWithResource/WithFinally.kt
T
2014-06-24 00:48:11 +04:00

16 lines
357 B
Kotlin

import java.io.*
public class C() {
throws(javaClass<IOException>())
fun foo() {
try {
FileInputStream("foo").use { stream ->
// reading something
val c = stream.read()
System.out.println(c)
}
} finally {
// dispose something else
}
}
}