[PSI2IR] Check how contextual functional type works with IR

This commit is contained in:
Anastasiya Shadrina
2021-11-18 16:04:22 +07:00
committed by TeamCityServer
parent a59b9e78ac
commit 08570a37b8
13 changed files with 217 additions and 0 deletions
@@ -0,0 +1,23 @@
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val result: String
field = "OK"
get
}
fun contextual(f: @ContextFunctionTypeParams(count = 1) Function1<C, String>): String {
return f.invoke(p1 = C())
}
fun box(): String {
return contextual(f = local fun <anonymous>(<this>: C): String {
return <this>.<get-result>()
}
)
}