From bcbff9838228320c5c03d920cdcc7218a51c4e80 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 17 Jul 2017 22:11:00 +0300 Subject: [PATCH] Check OOB stays the same for string in super type constructor call --- .../outOfBlock/StringInSuperConstroctorCall.kt | 12 ++++++++++++ .../OutOfBlockModificationTestGenerated.java | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt diff --git a/idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt b/idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt new file mode 100644 index 00000000000..679ec8f1fba --- /dev/null +++ b/idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt @@ -0,0 +1,12 @@ +// FALSE + +abstract class S(val f: () -> Unit) + +fun foo(s: String, f: () -> Unit) {} + +class ST : S( + { + foo("a test calculator") { + + } + }) \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java index 4930d085db4..8c0315a1f1c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java @@ -257,4 +257,10 @@ public class OutOfBlockModificationTestGenerated extends AbstractOutOfBlockModif String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropertyWithType_Initializer_String.kt"); doTest(fileName); } + + @TestMetadata("StringInSuperConstroctorCall.kt") + public void testStringInSuperConstroctorCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt"); + doTest(fileName); + } }