Fix unnecessary parenthesis around 'this' in refactorings
Operator priority calculation for 'this' expressions was incorrect in JetPsiUtil.getPriority(): it would return a very low value for a JetThisExpression, causing the IDE to report that parenthesis are necessary in an expression like '(this)[1]'. Fix this by making JetThisExpression not implement JetStatementExpression by removing the implements clause from JetLabelQualifiedInstanceExpression and adding it to all other subclasses of JetLabelQualifiedInstanceExpression. Fixes KT-4513.
This commit is contained in:
committed by
Nikolay Krasko
parent
85c46019d3
commit
9ce40cd17b
+1
-2
@@ -20,8 +20,7 @@ import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
public abstract class JetLabelQualifiedInstanceExpression extends JetLabelQualifiedExpression
|
||||
implements JetStatementExpression {
|
||||
public abstract class JetLabelQualifiedInstanceExpression extends JetLabelQualifiedExpression {
|
||||
|
||||
public JetLabelQualifiedInstanceExpression(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
|
||||
public class JetSuperExpression extends JetLabelQualifiedInstanceExpression {
|
||||
public class JetSuperExpression extends JetLabelQualifiedInstanceExpression implements JetStatementExpression {
|
||||
|
||||
public JetSuperExpression(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
|
||||
Reference in New Issue
Block a user