Commit Graph

2 Commits

Author SHA1 Message Date
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
Tuomas Tynkkynen 998d2c5ec8 Add tests for JetRefactoringUtil.selectExpression
Add tests for JetRefactoringUtil.selectExpression, which is invoked by
e.g. extract variable when some text is selected.

Test cases under idea/testData/expressionSelection/ should contain
Kotlin files with the usual <selection> tags, with the expected result
of selectExpression in the last comment of the file.
2014-02-24 22:40:05 +04:00