diff --git a/idea/src/org/jetbrains/jet/plugin/intentions/ConvertAssertToIfWithThrowIntention.kt b/idea/src/org/jetbrains/jet/plugin/intentions/ConvertAssertToIfWithThrowIntention.kt index 5dd8458611d..9397250a2e8 100644 --- a/idea/src/org/jetbrains/jet/plugin/intentions/ConvertAssertToIfWithThrowIntention.kt +++ b/idea/src/org/jetbrains/jet/plugin/intentions/ConvertAssertToIfWithThrowIntention.kt @@ -28,6 +28,7 @@ import org.jetbrains.jet.lang.resolve.DescriptorUtils import kotlin.properties.Delegates import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns import org.jetbrains.jet.lang.psi.JetIfExpression +import org.jetbrains.jet.lang.psi.JetDotQualifiedExpression public class ConvertAssertToIfWithThrowIntention : JetSelfTargetingIntention( "convert.assert.to.if.with.throw", javaClass()) { @@ -98,6 +99,11 @@ public class ConvertAssertToIfWithThrowIntention : JetSelfTargetingIntentionassert(true, "text") +} \ No newline at end of file diff --git a/idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt.after b/idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt.after new file mode 100644 index 00000000000..e91f674a0b9 --- /dev/null +++ b/idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt.after @@ -0,0 +1,6 @@ +// WITH_RUNTIME +fun foo() { + if (!true) { + throw AssertionError("text") + } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/intentions/CodeTransformationTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/intentions/CodeTransformationTestGenerated.java index a2a84e4f0d8..e0b3ada340a 100644 --- a/idea/tests/org/jetbrains/jet/plugin/intentions/CodeTransformationTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/plugin/intentions/CodeTransformationTestGenerated.java @@ -3556,6 +3556,11 @@ public class CodeTransformationTestGenerated extends AbstractCodeTransformationT doTestConvertAssertToIfWithThrowIntention("idea/testData/intentions/convertAssertToIf/booleanConditionWithVariables.kt"); } + @TestMetadata("dotQualifiedCall.kt") + public void testDotQualifiedCall() throws Exception { + doTestConvertAssertToIfWithThrowIntention("idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt"); + } + @TestMetadata("functionCallCondition.kt") public void testFunctionCallCondition() throws Exception { doTestConvertAssertToIfWithThrowIntention("idea/testData/intentions/convertAssertToIf/functionCallCondition.kt");