[FE] Add case with ambiguous generic call

This commit is contained in:
Anastasiya Shadrina
2021-06-28 18:36:16 +07:00
committed by TeamCityServer
parent a2403c470f
commit 2d743a2455
3 changed files with 7 additions and 0 deletions
@@ -10,6 +10,8 @@ interface C2 : Common {
fun Common.supertypeExtension() {} fun Common.supertypeExtension() {}
fun <T : Common> T.supertypeExtensionGeneric() {}
context(Common) context(Common)
fun supertypeContextual() {} fun supertypeContextual() {}
@@ -18,5 +20,6 @@ fun test() {
supertypeMember() supertypeMember()
member() member()
supertypeExtension() supertypeExtension()
supertypeExtensionGeneric()
supertypeContextual() supertypeContextual()
} }
@@ -10,6 +10,8 @@ interface C2 : Common {
fun Common.supertypeExtension() {} fun Common.supertypeExtension() {}
fun <T : Common> T.supertypeExtensionGeneric() {}
context(Common) context(Common)
fun supertypeContextual() {} fun supertypeContextual() {}
@@ -18,5 +20,6 @@ fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>supertypeMember<!>() <!OVERLOAD_RESOLUTION_AMBIGUITY!>supertypeMember<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>member<!>() <!OVERLOAD_RESOLUTION_AMBIGUITY!>member<!>()
<!AMBIBIGUOS_CALL_WITH_IMPLICIT_CONTEXT_RECEIVER!>supertypeExtension()<!> <!AMBIBIGUOS_CALL_WITH_IMPLICIT_CONTEXT_RECEIVER!>supertypeExtension()<!>
<!AMBIBIGUOS_CALL_WITH_IMPLICIT_CONTEXT_RECEIVER!>supertypeExtensionGeneric()<!>
<!MULTIPLE_ARGUMENTS_APPLICABLE_FOR_CONTEXT_RECEIVER!>supertypeContextual()<!> <!MULTIPLE_ARGUMENTS_APPLICABLE_FOR_CONTEXT_RECEIVER!>supertypeContextual()<!>
} }
@@ -3,6 +3,7 @@ package
public fun supertypeContextual(): kotlin.Unit public fun supertypeContextual(): kotlin.Unit
public fun test(): kotlin.Unit public fun test(): kotlin.Unit
public fun Common.supertypeExtension(): kotlin.Unit public fun Common.supertypeExtension(): kotlin.Unit
public fun </*0*/ T : Common> T.supertypeExtensionGeneric(): kotlin.Unit
public interface C1 : Common { public interface C1 : Common {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean