[FIR] Approximate exotic return types for public declarations
This commit is contained in:
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// !LANGUAGE: +StrictJavaNullabilityAssertions
|
||||
// TARGET_BACKEND: JVM
|
||||
// SKIP_JDK6
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
class A (val p: String, p1: String, p2: String) {
|
||||
|
||||
var cond1 :String = ""
|
||||
|
||||
+2
-2
@@ -29,6 +29,6 @@ fun chained2(arg: First) = run {
|
||||
}
|
||||
|
||||
fun test(arg: First) {
|
||||
chained1(arg).first()
|
||||
chained2(arg).first()
|
||||
chained1(arg).<!UNRESOLVED_REFERENCE!>first<!>()
|
||||
chained2(arg).<!UNRESOLVED_REFERENCE!>first<!>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,6 +33,6 @@ fun intersectArgWithSmartCastFromLambda(arg: One, arg2: Base) = argOrFn(arg) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
intersectAfterSmartCast(O1, O2).base()
|
||||
intersectArgWithSmartCastFromLambda(O1, O2).base()
|
||||
intersectAfterSmartCast(O1, O2).<!UNRESOLVED_REFERENCE!>base<!>()
|
||||
intersectArgWithSmartCastFromLambda(O1, O2).<!UNRESOLVED_REFERENCE!>base<!>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,5 +18,5 @@ fun smartCastAfterIntersection(a: One, b: Two) = run {
|
||||
}
|
||||
|
||||
fun test(one: One, two: Two) {
|
||||
smartCastAfterIntersection(one, two)?.base()
|
||||
smartCastAfterIntersection(one, two)?.<!UNRESOLVED_REFERENCE!>base<!>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ fun <S> intersectNoBound(vararg elements: S): S = TODO()
|
||||
fun some(a: One, b: Two, c: Three) = intersectNoBound(intersect(a, b), c)
|
||||
|
||||
fun test(arg: Base, arg2: Base) {
|
||||
some(O1, O2, O3).base()
|
||||
some(O1, O2, O3).<!UNRESOLVED_REFERENCE!>base<!>()
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ FILE fqName:<root> fileName:/intersectionType2_NI.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun run <T> (fn: kotlin.Function0<T of <root>.run>): T of <root>.run declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.run origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.run> declared in <root>.run' type=kotlin.Function0<T of <root>.run> origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:<root>.Foo
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): <root>.Foo declared in <root>'
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any declared in <root>'
|
||||
CALL 'public final fun run <T> (fn: kotlin.Function0<T of <root>.run>): T of <root>.run declared in <root>' type=<root>.Foo origin=null
|
||||
<T>: <root>.Foo
|
||||
fn: FUN_EXPR type=kotlin.Function0<<root>.Foo> origin=LAMBDA
|
||||
|
||||
@@ -75,9 +75,9 @@ FILE fqName:<root> fileName:/intersectionType2_OI.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun run <T> (fn: kotlin.Function0<T of <root>.run>): T of <root>.run declared in <root>'
|
||||
CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of <root>.run origin=INVOKE
|
||||
$this: GET_VAR 'fn: kotlin.Function0<T of <root>.run> declared in <root>.run' type=kotlin.Function0<T of <root>.run> origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:<root>.Foo
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): <root>.Foo declared in <root>'
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any declared in <root>'
|
||||
CALL 'public final fun run <T> (fn: kotlin.Function0<T of <root>.run>): T of <root>.run declared in <root>' type=<root>.Foo origin=null
|
||||
<T>: <root>.Foo
|
||||
fn: FUN_EXPR type=kotlin.Function0<<root>.Foo> origin=LAMBDA
|
||||
|
||||
Reference in New Issue
Block a user