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
The previous commit made JetThisExpression not implement
JetStatementExpression. This had the side effect that
smartSelectExpression over a label-qualified this expression
(e.g 'this@outerClass') would now also list a plain 'this'
as a potential expression. Restore the old behaviour by adding an
explicit check for JetThisExpression.
Add test suite for smart expression selector (the small expression list
popup in e.g. Extract Variable.)
The test file format is similar to that in JetNameSuggesterTest: a .kt
file with the usual <caret> marker specifying the place where the smart
selector will be run. Then, the last comment in the file should contain
the expected outcome.