[FE] Resolve overload conflict between contextual and non-contextual declarations

This commit is contained in:
Anastasiya Shadrina
2021-06-30 19:07:26 +07:00
committed by TeamCityServer
parent 7fd5034cd6
commit f427265739
12 changed files with 267 additions and 125 deletions
@@ -0,0 +1,12 @@
class Context
<!CONFLICTING_OVERLOADS!>context(Context)
fun f(): String<!> = TODO()
<!CONFLICTING_OVERLOADS!>fun f(): Any<!> = TODO()
fun test() {
with(Context()) {
f().length
}
}
@@ -0,0 +1,12 @@
class Context
context(Context)
fun f(): String = TODO()
fun f(): Any = TODO()
fun test() {
with(Context()) {
f().length
}
}
@@ -0,0 +1,12 @@
package
public fun f(): kotlin.Any
public fun f(): kotlin.String
public fun test(): kotlin.Unit
public final class Context {
public constructor Context()
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*/ /*fake_override*/ fun toString(): kotlin.String
}