From 640ae60a6bb8efec7e27b113021150b0f94157c8 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Mon, 4 Apr 2016 13:58:45 +0300 Subject: [PATCH] KT-11404: additional test to cover indirect inheritance --- ...ClassImplementIndirectlyInheritedInterface.kt | 16 ++++++++++++++++ .../idea/quickfix/QuickFixTestGenerated.java | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt diff --git a/idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt b/idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt new file mode 100644 index 00000000000..9714b142767 --- /dev/null +++ b/idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt @@ -0,0 +1,16 @@ +// "Let 'B' implement interface 'A'" "false" +// ACTION: Add 'a =' to argument +// ACTION: Convert to expression body +package let.implement + +fun bar() { + foo(B()) +} + + +fun foo(a: A) { +} + +interface A +interface InBetween : A +class B : InBetween diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index f872ee8c9fe..fe3e728c4bd 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -7354,6 +7354,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } + @TestMetadata("letClassImplementIndirectlyInheritedInterface.kt") + public void testLetClassImplementIndirectlyInheritedInterface() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt"); + doTest(fileName); + } + @TestMetadata("letClassImplementInterface.kt") public void testLetClassImplementInterface() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementInterface.kt");