diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java index cfc8b9528f0..5267c131534 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/DefaultErrorMessagesJvm.java @@ -139,7 +139,7 @@ public class DefaultErrorMessagesJvm implements DefaultErrorMessages.Extension { MAP.put(JVM_DEFAULT_REQUIRED_FOR_OVERRIDE, "'@JvmDefault' is required for an override of a '@JvmDefault' member"); MAP.put(JVM_DEFAULT_IN_DECLARATION, "Usage of '@JvmDefault' is only allowed if the flag -Xenable-jvm-default is enabled"); MAP.put(JVM_DEFAULT_THROUGH_INHERITANCE, "Inheritance from an interface with '@JvmDefault' members is only allowed if the flag -Xenable-jvm-default is enabled"); - MAP.put(USAGE_OF_JVM_THROUGH_SUPER_CALL, "Super calls of '@JvmDefault' members are only allowed if the flag -Xenable-jvm-default is enabled"); + MAP.put(USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL, "Super calls of '@JvmDefault' members are only allowed if the flag -Xenable-jvm-default is enabled"); } @NotNull diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java index 9147ae9da7d..1c97ef5e6bd 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/diagnostics/ErrorsJvm.java @@ -119,7 +119,7 @@ public interface ErrorsJvm { DiagnosticFactory0 JVM_DEFAULT_REQUIRED_FOR_OVERRIDE = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE); DiagnosticFactory0 JVM_DEFAULT_IN_DECLARATION = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE); DiagnosticFactory0 JVM_DEFAULT_THROUGH_INHERITANCE = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE); - DiagnosticFactory0 USAGE_OF_JVM_THROUGH_SUPER_CALL = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE); + DiagnosticFactory0 USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL = DiagnosticFactory0.create(ERROR); enum NullabilityInformationSource { KOTLIN { diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmDefaultSuperCallChecker.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmDefaultSuperCallChecker.kt new file mode 100644 index 00000000000..4cad15d0e58 --- /dev/null +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmDefaultSuperCallChecker.kt @@ -0,0 +1,35 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.resolve.jvm.platform + +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.config.AnalysisFlag +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor +import org.jetbrains.kotlin.resolve.DescriptorUtils +import org.jetbrains.kotlin.resolve.annotations.hasJvmDefaultAnnotation +import org.jetbrains.kotlin.resolve.calls.callResolverUtil.getSuperCallExpression +import org.jetbrains.kotlin.resolve.calls.checkers.CallChecker +import org.jetbrains.kotlin.resolve.calls.checkers.CallCheckerContext +import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall +import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm + +class JvmDefaultSuperCallChecker : CallChecker { + + override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) { + val enableJvmDefault = context.languageVersionSettings.getFlag(AnalysisFlag.enableJvmDefault) + if (enableJvmDefault) return + val superExpression = getSuperCallExpression(resolvedCall.call) ?: return + val resultingDescriptor = resolvedCall.resultingDescriptor as? CallableMemberDescriptor ?: return + if (!resultingDescriptor.hasJvmDefaultAnnotation()) return + + val containingDeclaration = DescriptorUtils.unwrapFakeOverrideToAnyDeclaration(resultingDescriptor).containingDeclaration + if (DescriptorUtils.isInterface(containingDeclaration) || + DescriptorUtils.isAnnotationClass(containingDeclaration) + ) { + context.trace.report(ErrorsJvm.USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL.on(reportOn)) + } + } +} \ No newline at end of file diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt index a3d7a8668ac..0a77bfc8b1c 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/platform/JvmPlatformConfigurator.kt @@ -96,5 +96,6 @@ object JvmPlatformConfigurator : PlatformConfigurator( container.useImpl() container.useImpl() container.useInstance(JvmTypeSpecificityComparator) + container.useImpl() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt index b2c9af5c71a..5c030bad3e5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt @@ -25,4 +25,8 @@ interface C: ANonDefault, A { interface D: A, ANonDefault { override fun test() {} +} + +class Foo : A { + override fun test() {} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.txt index b112aafa747..664cf34353e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.txt @@ -41,3 +41,11 @@ public interface D : A, ANonDefault { public open override /*2*/ fun test(): kotlin.Unit public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } + +public final class Foo : A { + public constructor Foo() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt new file mode 100644 index 00000000000..2d094b78a73 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt @@ -0,0 +1,38 @@ +// !JVM_TARGET: 1.8 +// FILE: 1.kt +interface A { + @JvmDefault + fun test() { + } +} + +// FILE: 2.kt +interface B : A { + +} + +interface C : B { + @JvmDefault + override fun test() { + super.test() + } +} + +open class Foo : B { + override fun test() { + super.test() + } +} +open class Foo2 : B + +open class Bar : Foo2() { + override fun test() { + super.test() + } +} + +class Bar2 : Bar() { + override fun test() { + super.test() + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.txt new file mode 100644 index 00000000000..81770418aa4 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.txt @@ -0,0 +1,54 @@ +package + +public interface A { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface B : A { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Bar : Foo2 { + public constructor Bar() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class Bar2 : Bar { + public constructor Bar2() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface C : B { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open override /*1*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Foo : B { + public constructor Foo() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class Foo2 : B { + public constructor Foo2() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open override /*1*/ /*fake_override*/ fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt new file mode 100644 index 00000000000..dc8b2fdfdf2 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt @@ -0,0 +1,27 @@ +// !JVM_TARGET: 1.8 +interface A { + @JvmDefault + fun test() { + } +} + +interface B{ + fun test() { + } +} + +interface C : A, B { + @JvmDefault + override fun test() { + super.test() + super.test() + } +} + +interface D : B, A { + @JvmDefault + override fun test() { + super.test() + super.test() + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.txt new file mode 100644 index 00000000000..6335028d81c --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.txt @@ -0,0 +1,29 @@ +package + +public interface A { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface B { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface C : A, B { + public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open override /*2*/ fun test(): kotlin.Unit + public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface D : B, A { + public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public open override /*2*/ fun test(): kotlin.Unit + public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt new file mode 100644 index 00000000000..6192ae36cb6 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt @@ -0,0 +1,22 @@ +// !JVM_TARGET: 1.8 +interface A { + @JvmDefault + fun test() +} + +interface B{ + fun test() { + } +} + +class C : A, B { + override fun test() { + super.test() + } +} + +class D : B, A { + override fun test() { + super.test() + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.txt new file mode 100644 index 00000000000..2b75896cc3b --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.txt @@ -0,0 +1,31 @@ +package + +public interface A { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + @kotlin.jvm.JvmDefault public abstract fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface B { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open fun test(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class C : A, B { + public constructor C() + public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*2*/ fun test(): kotlin.Unit + public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class D : B, A { + public constructor D() + public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*2*/ fun test(): kotlin.Unit + public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt new file mode 100644 index 00000000000..f3c5a4a7eef --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt @@ -0,0 +1,23 @@ +// !JVM_TARGET: 1.8 +interface A { + @JvmDefault + fun test() { + + } +} + +interface B{ + fun test() +} + +class C : A, B { + override fun test() { + super.test() + } +} + +class D : B, A { + override fun test() { + super.test() + } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverrideWithFeature.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.txt similarity index 59% rename from compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverrideWithFeature.txt rename to compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.txt index b112aafa747..45860d8aeed 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverrideWithFeature.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.txt @@ -7,35 +7,23 @@ public interface A { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public interface ANonDefault { +public interface B { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open fun test(): kotlin.Unit + public abstract fun test(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -public interface Abstract : A { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract override /*1*/ fun test(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface B : A { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ fun test(): kotlin.Unit - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface C : ANonDefault, A { +public final class C : A, B { + public constructor C() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ fun test(): kotlin.Unit public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String } -public interface D : A, ANonDefault { +public final class D : B, A { + public constructor D() public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ fun test(): kotlin.Unit diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index 934081d5015..514349bb33e 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -518,6 +518,30 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW doTest(fileName); } + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity.kt") + public void testSuperCallAmbiguity() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity2.kt") + public void testSuperCallAmbiguity2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity3.kt") + public void testSuperCallAmbiguity3() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); + doTest(fileName); + } + @TestMetadata("target6.kt") public void testTarget6() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java index ec4a50152e4..9f3017667c7 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java @@ -518,6 +518,30 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno doTest(fileName); } + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity.kt") + public void testSuperCallAmbiguity() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity2.kt") + public void testSuperCallAmbiguity2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); + doTest(fileName); + } + + @TestMetadata("superCallAmbiguity3.kt") + public void testSuperCallAmbiguity3() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); + doTest(fileName); + } + @TestMetadata("target6.kt") public void testTarget6() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 2d3737b8cef..aea8d2c98fa 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -1471,12 +1471,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } - @TestMetadata("bridgeInInterfaceWithProperties.kt") - public void testBridgeInInterfaceWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); - doTest(fileName); - } - @TestMetadata("complexMultiInheritance.kt") public void testComplexMultiInheritance() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt");