diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetExpressionWithLabel.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetExpressionWithLabel.kt index e83ab96c625..08e5d7d3dff 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetExpressionWithLabel.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetExpressionWithLabel.kt @@ -23,8 +23,10 @@ import org.jetbrains.kotlin.name.Name open public class JetExpressionWithLabel(node: ASTNode) : JetExpressionImpl(node) { public fun getTargetLabel(): JetSimpleNameExpression? = - findChildByType(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() diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiUtil.java b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiUtil.java index 9585d4f0b45..573281c4e98 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiUtil.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetPsiUtil.java @@ -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; } diff --git a/idea/resources/inspectionDescriptions/RemoveExplicitSuperQualifier.html b/idea/resources/inspectionDescriptions/RemoveExplicitSuperQualifier.html new file mode 100644 index 00000000000..7c25baeb080 --- /dev/null +++ b/idea/resources/inspectionDescriptions/RemoveExplicitSuperQualifier.html @@ -0,0 +1,5 @@ + + +This inspection reports any super member call with redundant supertype qualification + + diff --git a/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/after.kt.template b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/after.kt.template new file mode 100644 index 00000000000..f81b8e9194c --- /dev/null +++ b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/after.kt.template @@ -0,0 +1,9 @@ +open class B { + open fun foo(){} +} + +class A : B() { + override fun foo(p: String) { + super.foo("") + } +} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/before.kt.template b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/before.kt.template new file mode 100644 index 00000000000..a832337df6d --- /dev/null +++ b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/before.kt.template @@ -0,0 +1,9 @@ +open class B { + open fun foo(){} +} + +class A : B() { + override fun foo() { + super.foo("") + } +} \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/description.html b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/description.html new file mode 100644 index 00000000000..6004b3b4447 --- /dev/null +++ b/idea/resources/intentionDescriptions/RemoveExplicitSuperQualifierIntention/description.html @@ -0,0 +1,5 @@ + + +This intention removes a redundant supertype qualification from a "super" expression + + \ No newline at end of file diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index 3026db25489..8204b8b3c36 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -727,6 +727,11 @@ Kotlin + + org.jetbrains.kotlin.idea.intentions.RemoveExplicitSuperQualifierIntention + Kotlin + + org.jetbrains.kotlin.idea.intentions.RemoveCurlyBracesFromTemplateIntention Kotlin @@ -1021,6 +1026,13 @@ level="WEAK WARNING" /> + + (RemoveExplicitSuperQualifierIntention()) { + override val problemHighlightType: ProblemHighlightType + get() = ProblemHighlightType.LIKE_UNUSED_SYMBOL +} + +public class RemoveExplicitSuperQualifierIntention : JetSelfTargetingRangeIntention(javaClass(), "Remove explicit supertype qualification") { + override fun applicabilityRange(element: JetSuperExpression): TextRange? { + if (element.superTypeQualifier == null) return null + + val qualifiedExpression = element.getQualifiedExpressionForReceiver() ?: return null + val selector = qualifiedExpression.selectorExpression ?: return null + + val bindingContext = selector.analyze(BodyResolveMode.PARTIAL) + if (selector.getResolvedCall(bindingContext) == null) return null + val resolutionScope = bindingContext[BindingContext.RESOLUTION_SCOPE, qualifiedExpression] ?: return null + val dataFlowInfo = bindingContext.getDataFlowInfo(element) + val expectedType = bindingContext[BindingContext.EXPECTED_EXPRESSION_TYPE, qualifiedExpression] ?: TypeUtils.NO_EXPECTED_TYPE + + val newQualifiedExpression = JetPsiFactory(element).createExpressionByPattern("$0.$1", toNonQualified(element), selector) as JetQualifiedExpression + val newBindingContext = newQualifiedExpression.analyzeInContext(resolutionScope, qualifiedExpression, dataFlowInfo = dataFlowInfo, expectedType = expectedType, isStatement = true) + val newResolvedCall = newQualifiedExpression.selectorExpression.getResolvedCall(newBindingContext) ?: return null + if (ErrorUtils.isError(newResolvedCall.resultingDescriptor)) return null + + return TextRange(element.instanceReference.endOffset, element.labelQualifier?.startOffset ?: element.endOffset) + } + + override fun applyTo(element: JetSuperExpression, editor: Editor) { + element.replace(toNonQualified(element)) + } + + private fun toNonQualified(superExpression: JetSuperExpression): JetSuperExpression { + val factory = JetPsiFactory(superExpression) + val labelName = superExpression.getLabelNameAsName() + return (if (labelName != null) + factory.createExpressionByPattern("super@$0", labelName) + else + factory.createExpression("super")) as JetSuperExpression + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/.intention b/idea/testData/intentions/removeExplicitSuperQualifier/.intention new file mode 100644 index 00000000000..ad4aefed6cb --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/.intention @@ -0,0 +1 @@ +org.jetbrains.kotlin.idea.intentions.RemoveExplicitSuperQualifierIntention diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt b/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt new file mode 100644 index 00000000000..74635f5d607 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt @@ -0,0 +1,15 @@ +// IS_APPLICABLE: false + +open class B { + open fun foo(p: String){} +} + +interface I { + fun foo(p: String) {} +} + +class A : B(), I { + override fun foo(p: String) { + super.foo("") + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt b/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt new file mode 100644 index 00000000000..6a77b788936 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt @@ -0,0 +1,15 @@ +// IS_APPLICABLE: false + +open class B { + open val v: Int = 0 +} + +interface I { + val v: Int + get() = 0 +} + +class A : B(), I { + override val v: Int + get() = super.v +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt b/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt new file mode 100644 index 00000000000..3624f7f93fe --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt @@ -0,0 +1,17 @@ +open class B { + open fun foo(p: String){} + + fun foo(p: Int){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + fun foo(p: Any) { + if (p is Int) { + super.foo(p) + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt.after new file mode 100644 index 00000000000..bab20827cfb --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt.after @@ -0,0 +1,17 @@ +open class B { + open fun foo(p: String){} + + fun foo(p: Int){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + fun foo(p: Any) { + if (p is Int) { + super.foo(p) + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt new file mode 100644 index 00000000000..cacebd03072 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt @@ -0,0 +1,15 @@ +// ERROR: No value passed for parameter p + +open class B { + open fun foo(p: String){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + override fun foo(p: String) { + super.foo() + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt.after new file mode 100644 index 00000000000..ae1be0d8706 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt.after @@ -0,0 +1,15 @@ +// ERROR: No value passed for parameter p + +open class B { + open fun foo(p: String){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + override fun foo(p: String) { + super.foo() + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt new file mode 100644 index 00000000000..911c443a736 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt @@ -0,0 +1,17 @@ +// IS_APPLICABLE: false +// ERROR: None of the following functions can be called with the arguments supplied.
  • foo(Int) defined in B
  • foo(String) defined in B
+ +open class B { + open fun foo(p: String){} + fun foo(p: Int){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + override fun foo(p: String) { + super.foo() + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt b/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt new file mode 100644 index 00000000000..27ffa1f4f5e --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt @@ -0,0 +1,8 @@ +open class B { + open fun foo(){} +} +class A : B() { + override fun foo() { + super.foo() + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt.after new file mode 100644 index 00000000000..6034bb46d82 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt.after @@ -0,0 +1,8 @@ +open class B { + open fun foo(){} +} +class A : B() { + override fun foo() { + super.foo() + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt b/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt new file mode 100644 index 00000000000..75cdbe1c046 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt @@ -0,0 +1,16 @@ +open class Base { + open fun foo() { + } +} + +class A : Base() { + override fun foo() { + super.foo() + } + + inner class C { + fun test() { + super@A.foo() + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt.after new file mode 100644 index 00000000000..6b8548ce31a --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt.after @@ -0,0 +1,16 @@ +open class Base { + open fun foo() { + } +} + +class A : Base() { + override fun foo() { + super.foo() + } + + inner class C { + fun test() { + super@A.foo() + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt new file mode 100644 index 00000000000..993192735b0 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt @@ -0,0 +1,15 @@ +open class B { + open fun foo(p: String){} + + fun foo(p: Int){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + override fun foo(p: String) { + super.foo("") + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt.after new file mode 100644 index 00000000000..303e51f12a3 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt.after @@ -0,0 +1,15 @@ +open class B { + open fun foo(p: String){} + + fun foo(p: Int){} +} + +interface I { + fun foo(p: String) +} + +class A : B(), I { + override fun foo(p: String) { + super.foo("") + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt new file mode 100644 index 00000000000..af42c84ab7b --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt @@ -0,0 +1,12 @@ +open class B { + open val v: Int = 0 +} + +interface I { + val v: Int +} + +class A : B(), I { + override val v: Int + get() = super.v +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt.after b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt.after new file mode 100644 index 00000000000..8c02ac80e54 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt.after @@ -0,0 +1,12 @@ +open class B { + open val v: Int = 0 +} + +interface I { + val v: Int +} + +class A : B(), I { + override val v: Int + get() = super.v +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt b/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt new file mode 100644 index 00000000000..767594c6af2 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt @@ -0,0 +1,18 @@ +// IS_APPLICABLE: false + +open class Base { + open fun foo() { + } +} + +class A : Base() { + override fun foo() { + super.foo() + } + + inner class C { + fun test() { + super@A.foo() + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt b/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt new file mode 100644 index 00000000000..a5285c63dba --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt @@ -0,0 +1,18 @@ +// IS_APPLICABLE: false + +open class Base { + open fun foo() { + } +} + +class A : Base() { + override fun foo() { + super.foo() + } + + inner class C { + fun test() { + super@A.foo() + } + } +} \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/expected.xml b/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/expected.xml new file mode 100644 index 00000000000..ceb36005e22 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/expected.xml @@ -0,0 +1,73 @@ + + + UnambiguousSuperProperty.kt + 11 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + UnambiguousSuperMethod.kt + 13 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + SingleSuper.kt + 6 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + IncompleteCall.kt + 13 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + DataFlowInfoUsed.kt + 14 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + SuperWithLabel.kt + 13 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + WrongOffset1.kt + 15 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + + + WrongOffset2.kt + 15 + light_idea_test_case + + Supertype qualification is unnecessary + Remove explicit supertype qualification + + \ No newline at end of file diff --git a/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test b/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test new file mode 100644 index 00000000000..7556e822484 --- /dev/null +++ b/idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test @@ -0,0 +1 @@ +// INSPECTION_CLASS: org.jetbrains.kotlin.idea.intentions.RemoveExplicitSuperQualifierInspection diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java index 6d4876ccbc1..fdb1874eaf8 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/JetInspectionTestGenerated.java @@ -67,6 +67,12 @@ public class JetInspectionTestGenerated extends AbstractJetInspectionTest { doTest(fileName); } + @TestMetadata("removeExplicitSuperQualifier/inspectionData/inspections.test") + public void testRemoveExplicitSuperQualifier_inspectionData_Inspections_test() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test"); + doTest(fileName); + } + @TestMetadata("removeExplicitTypeArguments/inspectionData/inspections.test") public void testRemoveExplicitTypeArguments_inspectionData_Inspections_test() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/inspectionData/inspections.test"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 3c78f9994f8..454a5550ff2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -6019,6 +6019,82 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } } + @TestMetadata("idea/testData/intentions/removeExplicitSuperQualifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveExplicitSuperQualifier extends AbstractIntentionTest { + public void testAllFilesPresentInRemoveExplicitSuperQualifier() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitSuperQualifier"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("AmbiguousSuperMethod.kt") + public void testAmbiguousSuperMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt"); + doTest(fileName); + } + + @TestMetadata("AmbiguousSuperProperty.kt") + public void testAmbiguousSuperProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt"); + doTest(fileName); + } + + @TestMetadata("DataFlowInfoUsed.kt") + public void testDataFlowInfoUsed() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt"); + doTest(fileName); + } + + @TestMetadata("IncompleteCall.kt") + public void testIncompleteCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt"); + doTest(fileName); + } + + @TestMetadata("IncompleteCallAmbiguous.kt") + public void testIncompleteCallAmbiguous() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt"); + doTest(fileName); + } + + @TestMetadata("SingleSuper.kt") + public void testSingleSuper() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt"); + doTest(fileName); + } + + @TestMetadata("SuperWithLabel.kt") + public void testSuperWithLabel() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt"); + doTest(fileName); + } + + @TestMetadata("UnambiguousSuperMethod.kt") + public void testUnambiguousSuperMethod() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt"); + doTest(fileName); + } + + @TestMetadata("UnambiguousSuperProperty.kt") + public void testUnambiguousSuperProperty() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt"); + doTest(fileName); + } + + @TestMetadata("WrongOffset1.kt") + public void testWrongOffset1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt"); + doTest(fileName); + } + + @TestMetadata("WrongOffset2.kt") + public void testWrongOffset2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt"); + doTest(fileName); + } + + } + @TestMetadata("idea/testData/intentions/removeExplicitType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)