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
This commit is contained in:
committed by
Nikolay Krasko
parent
998d2c5ec8
commit
7a2321460d
@@ -0,0 +1,7 @@
|
||||
fun f() {
|
||||
@loop while (true) {
|
||||
break@lo<caret>op
|
||||
}
|
||||
}
|
||||
// KT-4515: Extract variable can attempt to extract a label from a labelled statement.
|
||||
/* */
|
||||
Reference in New Issue
Block a user