From 2d743a24555a47fc6ff98dfc22348083e6a7dd0f Mon Sep 17 00:00:00 2001 From: Anastasiya Shadrina Date: Mon, 28 Jun 2021 18:36:16 +0700 Subject: [PATCH] [FE] Add case with ambiguous generic call --- .../tests/extensions/contextReceivers/ambiguityInGroup.fir.kt | 3 +++ .../tests/extensions/contextReceivers/ambiguityInGroup.kt | 3 +++ .../tests/extensions/contextReceivers/ambiguityInGroup.txt | 1 + 3 files changed, 7 insertions(+) diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt index 15104a1ce9c..f0aebe8fd7a 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt @@ -10,6 +10,8 @@ interface C2 : Common { fun Common.supertypeExtension() {} +fun T.supertypeExtensionGeneric() {} + context(Common) fun supertypeContextual() {} @@ -18,5 +20,6 @@ fun test() { supertypeMember() member() supertypeExtension() + supertypeExtensionGeneric() supertypeContextual() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.kt index c3242c0f489..0c071f3c384 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.kt @@ -10,6 +10,8 @@ interface C2 : Common { fun Common.supertypeExtension() {} +fun T.supertypeExtensionGeneric() {} + context(Common) fun supertypeContextual() {} @@ -18,5 +20,6 @@ fun test() { supertypeMember() member() supertypeExtension() + supertypeExtensionGeneric() supertypeContextual() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.txt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.txt index 6bcf257f98d..6a76d813ae4 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.txt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.txt @@ -3,6 +3,7 @@ package public fun supertypeContextual(): kotlin.Unit public fun test(): kotlin.Unit public fun Common.supertypeExtension(): kotlin.Unit +public fun T.supertypeExtensionGeneric(): kotlin.Unit public interface C1 : Common { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean