Inspection & fix for redundant supertype qualification
This commit is contained in:
@@ -23,8 +23,10 @@ import org.jetbrains.kotlin.name.Name
|
||||
open public class JetExpressionWithLabel(node: ASTNode) : JetExpressionImpl(node) {
|
||||
|
||||
public fun getTargetLabel(): JetSimpleNameExpression? =
|
||||
findChildByType<JetContainerNode>(JetNodeTypes.LABEL_QUALIFIER)?.
|
||||
findChildByType(JetNodeTypes.LABEL) as? JetSimpleNameExpression
|
||||
labelQualifier?.findChildByType(JetNodeTypes.LABEL) as? JetSimpleNameExpression
|
||||
|
||||
public val labelQualifier: JetContainerNode?
|
||||
get() = findChildByType(JetNodeTypes.LABEL_QUALIFIER)
|
||||
|
||||
public fun getLabelName(): String? = getTargetLabel()?.getReferencedName()
|
||||
public fun getLabelNameAsName(): Name? = getTargetLabel()?.getReferencedNameAsName()
|
||||
|
||||
@@ -494,6 +494,10 @@ public class JetPsiUtil {
|
||||
return JetExpressionParsing.Precedence.ASSIGNMENT.ordinal();
|
||||
}
|
||||
|
||||
if (expression instanceof JetSuperExpression) {
|
||||
return maxPriority;
|
||||
}
|
||||
|
||||
if (expression instanceof JetDeclaration || expression instanceof JetStatementExpression) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user