fun test() { var res: String? = null var foo: String? = null res = try { "success" } catch (e: Exception) { "failure" } finally { foo = "finally" } }