Create RedundantLabelMigrationInspection
#KT-36262
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user