FIR body resolve: support subject type calculation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
public final fun builder(c: R|error: createSuspendFunctionType not supported|): R|kotlin/Unit|
|
||||
public final fun builder(c: R|class error: createSuspendFunctionType not supported|): R|kotlin/Unit|
|
||||
|
||||
public final class Controller : R|kotlin/Any| {
|
||||
public final suspend fun suspendFun(): R|kotlin/Unit|
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
public final fun test1(): R|error: createSuspendFunctionType not supported|
|
||||
public final fun test1(): R|class error: createSuspendFunctionType not supported|
|
||||
|
||||
public final fun test2(): R|error: createSuspendFunctionType not supported|
|
||||
public final fun test2(): R|class error: createSuspendFunctionType not supported|
|
||||
|
||||
public final fun test3(): R|kotlin/collections/List<error: createSuspendFunctionType not supported>|
|
||||
public final fun test3(): R|kotlin/collections/List<class error: createSuspendFunctionType not supported>|
|
||||
|
||||
public final fun test4(): R|class error: createSuspendFunctionType not supported|
|
||||
|
||||
public final fun test4(): R|error: createSuspendFunctionType not supported|
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
fun foo() = if (true) 1 else 0
|
||||
fun foo() = if (true) 1 else 0
|
||||
|
||||
fun bar(arg: Any?) = when (arg) {
|
||||
is Int -> arg as Int
|
||||
else -> 42
|
||||
}
|
||||
@@ -10,3 +10,14 @@ FILE: when.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final fun bar(arg: R|kotlin/Any|?): R|kotlin/Int| {
|
||||
^bar when (R|<local>/arg|) {
|
||||
($subj$ is R|kotlin/Int|) -> {
|
||||
(R|<local>/arg| as R|kotlin/Int|)
|
||||
}
|
||||
else -> {
|
||||
Int(42)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user