[FE] Report ambiguity in all possible cases

This commit is contained in:
Anastasiya Shadrina
2021-06-20 06:27:14 +07:00
committed by TeamCityServer
parent 37495bcba0
commit 814777ba8c
18 changed files with 111 additions and 104 deletions
@@ -0,0 +1,22 @@
interface Common {
fun supertypeMember() {}
}
interface C1 : Common {
fun member() {}
}
interface C2 : Common {
fun member() {}
}
fun Common.supertypeExtension() {}
context(Common)
fun supertypeContextual() {}
context(C1, C2)
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>supertypeMember<!>()
<!OVERLOAD_RESOLUTION_AMBIGUITY!>member<!>()
<!AMBIBIGUOS_CALL_WITH_IMPLICIT_CONTEXT_RECEIVER!>supertypeExtension()<!>
<!MULTIPLE_ARGUMENTS_APPLICABLE_FOR_CONTEXT_RECEIVER!>supertypeContextual()<!>
}