[FIR] Fix suspend functional type deserialization

This commit is contained in:
simon.ogorodnik
2020-03-19 21:02:46 +03:00
parent 4fac6d8fb5
commit 5a3eefcba1
10 changed files with 129 additions and 33 deletions
@@ -10,9 +10,9 @@ class Case1() {
val y = this
//this is Case1 instead of SequenceScope<String>
<!UNRESOLVED_REFERENCE!>yield<!>("") // UNRESOLVED_REFERENCE
yield("") // UNRESOLVED_REFERENCE
this.<!UNRESOLVED_REFERENCE!>yield<!>("") //UNRESOLVED_REFERENCE
this.yield("") //UNRESOLVED_REFERENCE
this as SequenceScope<String>
@@ -27,14 +27,14 @@ fun case2() {
val x = sequence<String> {
val y = this
<!UNRESOLVED_REFERENCE!>yield<!>("") // UNRESOLVED_REFERENCE
yield("") // UNRESOLVED_REFERENCE
this.<!UNRESOLVED_REFERENCE!>yield<!>("") //UNRESOLVED_REFERENCE
this.yield("") //UNRESOLVED_REFERENCE
this as SequenceScope<String>
<!UNRESOLVED_REFERENCE!>yield<!>("") // UNRESOLVED_REFERENCE
yield("") // UNRESOLVED_REFERENCE
this.<!UNRESOLVED_REFERENCE!>yield<!>("") // UNRESOLVED_REFERENCE
this.yield("") // UNRESOLVED_REFERENCE
}
}
@@ -5,26 +5,26 @@ FILE: receiverResolutionInLambda.kt
}
public final fun foo(): R|kotlin/Unit| {
lval x: R|kotlin/sequences/Sequence<kotlin/String>| = R|kotlin/sequences/sequence|<R|kotlin/String|>(<L> = sequence@fun <anonymous>(): R|kotlin/Unit| {
lval y: R|Case1| = this@R|/Case1|
<Unresolved name: yield>#(String())
this@R|/Case1|.<Unresolved name: yield>#(String())
(this@R|/Case1| as R|kotlin/sequences/SequenceScope<kotlin/String>|)
this@R|/Case1|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
this@R|/Case1|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
lval x: R|kotlin/sequences/Sequence<kotlin/String>| = R|kotlin/sequences/sequence|<R|kotlin/String|>(<L> = sequence@fun R|kotlin/sequences/SequenceScope<kotlin/String>|.<anonymous>(): R|kotlin/Unit| {
lval y: R|kotlin/sequences/SequenceScope<kotlin/String>| = this@R|special/anonymous|
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
(this@R|special/anonymous| as R|kotlin/sequences/SequenceScope<kotlin/String>|)
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
}
)
}
}
public final fun case2(): R|kotlin/Unit| {
lval x: R|kotlin/sequences/Sequence<kotlin/String>| = R|kotlin/sequences/sequence|<R|kotlin/String|>(<L> = sequence@fun <anonymous>(): <ERROR TYPE REF: Unresolved name: yield> {
lval y: R|ERROR CLASS: Unresolved this@null| = this#
<Unresolved name: yield>#(String())
this#.<Unresolved name: yield>#(String())
(this# as R|kotlin/sequences/SequenceScope<kotlin/String>|)
<Unresolved name: yield>#(String())
^ this#.<Unresolved name: yield>#(String())
lval x: R|kotlin/sequences/Sequence<kotlin/String>| = R|kotlin/sequences/sequence|<R|kotlin/String|>(<L> = sequence@fun R|kotlin/sequences/SequenceScope<kotlin/String>|.<anonymous>(): R|kotlin/Unit| {
lval y: R|kotlin/sequences/SequenceScope<kotlin/String>| = this@R|special/anonymous|
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
(this@R|special/anonymous| as R|kotlin/sequences/SequenceScope<kotlin/String>|)
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
this@R|special/anonymous|.R|FakeOverride<kotlin/sequences/SequenceScope.yield: R|kotlin/Unit|>|(String())
}
)
}