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

27 lines
460 B
Plaintext
Vendored

// PARAM_TYPES: kotlin.Int
// PARAM_TYPES: kotlin.Int
// PARAM_DESCRIPTOR: value-parameter a: kotlin.Int defined in foo
// PARAM_DESCRIPTOR: value-parameter b: kotlin.Int defined in foo
// SIBLING:
fun foo(a: Int, b: Int): Int {
return i(a, b) + 1
}
fun bar() {
fun f() = 1
val a = 1
val b = 2
val c = 3
i(c, b)
i(b, a)
i(a, a)
a + a*b
a + c
i(f(), a)
i(f(), f())
}
private fun i(a: Int, b: Int) = a + b * a