[FE] Add context receivers to scope

This commit is contained in:
Anastasiya Shadrina
2021-02-16 23:47:56 +07:00
committed by TeamCityServer
parent c5687e080d
commit d923c95671
27 changed files with 166 additions and 59 deletions
@@ -0,0 +1,18 @@
class A {
fun h1() {}
}
class B {
fun h2() {}
}
fun B.foo() {
<!UNRESOLVED_REFERENCE!>h1<!>()
h2()
}
context(A)
fun B.bar() {
<!UNRESOLVED_REFERENCE!>h1<!>()
h2()
}
@@ -0,0 +1,18 @@
class A {
fun h1() {}
}
class B {
fun h2() {}
}
fun B.foo() {
<!UNRESOLVED_REFERENCE!>h1<!>()
h2()
}
context(A)
fun B.bar() {
h1()
h2()
}
@@ -0,0 +1,20 @@
package
public fun B.bar(): kotlin.Unit
public fun B.foo(): kotlin.Unit
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun h1(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun h2(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}