RestrictReturnStatementTargetMigrationInspection: add quickfix

#KT-36262 Fixed
This commit is contained in:
Dmitry Gridin
2020-01-29 15:07:27 +07:00
parent f1bad0c9ae
commit 181dd432ca
7 changed files with 50 additions and 1 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.migration.RestrictReturnStatementTargetMigrationInspection
@@ -0,0 +1,8 @@
// LANGUAGE_VERSION: 1.4
// PROBLEM: none
// ERROR: Target label does not denote a function
fun testValLabelInReturn() {
<caret>L@ val fn = { return@L }
fn()
}
@@ -0,0 +1,7 @@
// LANGUAGE_VERSION: 1.4
// SKIP_ERRORS_AFTER
fun testValLabelInReturn() {
L@ val fn = { return@L<caret> }
fn()
}
@@ -0,0 +1,7 @@
// LANGUAGE_VERSION: 1.4
// SKIP_ERRORS_AFTER
fun testValLabelInReturn() {
L@ val fn = { return }
fn()
}