Files
kotlin/idea/testData/refactoring/extractFunction/controlFlow/throws/evalExpressionWithThrow.kt
Valentin Kipyatkov 4cd7193047 KT-11018 Ctrl + Mouse Hover shows a var as val
#KT-11018 Fixed
2016-02-13 10:20:20 +03:00

12 lines
348 B
Kotlin
Vendored

// SUGGESTED_NAMES: i, getT
// PARAM_TYPES: kotlin.Int
// PARAM_TYPES: kotlin.Int
// PARAM_DESCRIPTOR: value-parameter a: kotlin.Int defined in foo
// PARAM_DESCRIPTOR: val b: kotlin.Int defined in foo
// SIBLING:
fun foo(a: Int): Int {
val b: Int = 1
val t = <selection>if (a > 0) throw Exception("") else a + b</selection>
return t
}