Files
kotlin-fork/idea/testData/expressionSelection/labelledStatement.kt
T
Tuomas Tynkkynen 7a2321460d Prevent expression selector from selecting just a label
Previously, extract variable could act on e.g. 'break@outerLoop' and
extract the label, leading into nonsensical 'val x = @outerLoop'.
Prevent JetRefactoringUtil.selectExpression from returning label
expressions to fix this.

 #KT-4515 Fixed
2014-02-24 22:40:14 +04:00

8 lines
189 B
Kotlin

fun f() {
@loop while (true) {
break@lo<selection>o</selection>p
}
}
// KT-4515: Extract variable can attempt to extract a label from a labelled statement.
/* break@loop */