Create RedundantLabelMigrationInspection

#KT-36262
This commit is contained in:
Dmitry Gridin
2020-01-29 13:35:05 +07:00
parent 2441ee80e4
commit 311860699e
8 changed files with 88 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.migration.RedundantLabelMigrationInspection
@@ -0,0 +1,8 @@
// LANGUAGE_VERSION: 1.4
// PROBLEM: none
// ERROR: Target label does not denote a function
fun testValLabelInReturn() {
L@ val fn = { <caret>return@L }
fn()
}
@@ -0,0 +1,7 @@
// LANGUAGE_VERSION: 1.4
// DISABLE-ERRORS
fun testValLabelInReturn() {
<caret>L@ val fn = { return@L }
fn()
}
@@ -0,0 +1,7 @@
// LANGUAGE_VERSION: 1.4
// DISABLE-ERRORS
fun testValLabelInReturn() {
val fn = { return@L }
fn()
}