[FE] Relax the "no subtyping between context receivers" limitation

This commit is contained in:
Anastasiya Shadrina
2021-06-10 15:21:32 +07:00
committed by TeamCityServer
parent bfd20e1890
commit 1f6746dc74
6 changed files with 31 additions and 53 deletions
@@ -14,28 +14,28 @@ fun <T> f(lazy1: Lazy<Int>, lazy2: Lazy<CharSequence>, lazyT: Lazy<T>, lazyLazyT
with(lazy2) {
test1()
test2()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>test3<!>()
<!NO_CONTEXT_RECEIVER!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test3<!>()<!>
}
}
with(lazy2) {
with(lazy1) {
test1()
test2()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>test3<!>()
<!NO_CONTEXT_RECEIVER!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test3<!>()<!>
}
}
with(lazyT) {
with(lazy1) {
<!NO_CONTEXT_RECEIVER!>test1()<!>
test2()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>test3<!>()
<!NO_CONTEXT_RECEIVER!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>test3<!>()<!>
}
}
with(lazyLazyT) {
with(lazy1) {
<!NO_CONTEXT_RECEIVER!>test1()<!>
test2()
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>test3<!>()
test3()
}
}
with(lazy1) {