[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
@@ -1,4 +1,4 @@
public final fun builder(c: @R|kotlin/ExtensionFunctionType|() R|ERROR CLASS: createSuspendFunctionType not supported|): R|kotlin/Unit|
public final fun builder(c: R|suspend test/Controller.() -> kotlin/Unit|): R|kotlin/Unit|
public final class Controller : R|kotlin/Any| {
public final suspend fun suspendFun(): R|kotlin/Unit|
@@ -6,3 +6,4 @@ public final class Controller : R|kotlin/Any| {
public constructor(): R|test/Controller|
}
@@ -1,8 +1,8 @@
public final fun test1(): R|ERROR CLASS: createSuspendFunctionType not supported|
public final fun test1(): R|suspend () -> kotlin/Unit|
public final fun test2(): @R|kotlin/ExtensionFunctionType|() R|ERROR CLASS: createSuspendFunctionType not supported|
public final fun test2(): R|suspend kotlin/Int.() -> kotlin/Int|
public final fun test3(): R|kotlin/collections/List<ERROR CLASS: createSuspendFunctionType not supported>|
public final fun test3(): R|kotlin/collections/List<kotlin/coroutines/SuspendFunction0<kotlin/Unit>>|
public final fun test4(): R|ERROR CLASS: createSuspendFunctionType not supported|
public final fun test4(): R|suspend () -> kotlin/coroutines/SuspendFunction0<kotlin/Unit>|
@@ -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())
}
)
}