[FE] KT-51234 Check subtyping between context receivers

This commit is contained in:
Anastasia.Shadrina
2022-03-31 00:50:23 +07:00
committed by teamcity
parent a3fa2dc9bf
commit 292c0c4383
14 changed files with 714 additions and 22 deletions
@@ -3,7 +3,7 @@
class Box<E>(val x: E)
class A<X, Y> {
class A<X, Y : Number> {
context(Box<X>, Y)
fun foo(): String = x.toString() + this@Y.toString()
@@ -12,7 +12,7 @@ class A<X, Y> {
}
context(Box<X>, Y)
fun <X, Y> bar(): String = x.toString() + this@Y.toString()
fun <X, Y : Number> bar(): String = x.toString() + this@Y.toString()
fun box(): String {
return with(Box("OK")) {