Files
kotlin-fork/idea/testData/quickfix/foldTryCatch/shadow.kt
T
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00

16 lines
365 B
Kotlin
Vendored

// "class org.jetbrains.kotlin.idea.quickfix.LiftAssignmentOutOfTryFix" "false"
// ACTION: Change to var
// ERROR: Val cannot be reassigned
// ERROR: Val cannot be reassigned
// WITH_RUNTIME
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun foo() {
val x = 1
try {
val x = 2
x = 3
} catch(e: Exception) {
<caret>x = 4
}
}