Unmute previously failing piece of test at definitelyNotNullAsArgument.kt

^KT-49419 Obsolete
This commit is contained in:
Denis.Zharkov
2022-02-08 17:06:39 +03:00
committed by teamcity
parent 032d69aa41
commit baa287d6ee
5 changed files with 33 additions and 2 deletions
@@ -93,3 +93,14 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.I
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo2 visibility:public modality:FINAL <T1, T2> (p1:T1 of <root>.foo2, p2:T2 of <root>.foo2) returnType:kotlin.Unit
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[<root>.I<{T1 of <root>.foo2 & Any}>]
VALUE_PARAMETER name:p1 index:0 type:T1 of <root>.foo2
VALUE_PARAMETER name:p2 index:1 type:T2 of <root>.foo2
BLOCK_BODY
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
$this: GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={T1 of <root>.foo2 & Any} origin=EXCLEXCL
<T0>: T1 of <root>.foo2
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
@@ -35,3 +35,8 @@ class C<TT : Any?> : I<(TT & Any)> {
}
}
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
p2.input(t = CHECK_NOT_NULL<T1>(arg0 = p1))
}
@@ -93,3 +93,15 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.I
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo2 visibility:public modality:FINAL <T1, T2> (p1:T1 of <root>.foo2, p2:T2 of <root>.foo2) returnType:kotlin.Unit
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?]
TYPE_PARAMETER name:T2 index:1 variance: superTypes:[<root>.I<{T1 of <root>.foo2 & Any}>]
VALUE_PARAMETER name:p1 index:0 type:T1 of <root>.foo2
VALUE_PARAMETER name:p2 index:1 type:T2 of <root>.foo2
BLOCK_BODY
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
$this: TYPE_OP type=<root>.I<{T1 of <root>.foo2 & Any}> origin=IMPLICIT_CAST typeOperand=<root>.I<{T1 of <root>.foo2 & Any}>
GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=T1 of <root>.foo2 origin=EXCLEXCL
<T0>: T1 of <root>.foo2
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
@@ -16,5 +16,4 @@ class C<TT>(val t: TT): I<TT & Any> {
override fun output(): TT & Any = t!!
}
// TODO: FE gets crashed on that method, KT-49419
//fun <T1 , T2 : I<T1 & Any>> foo2(p1: T, p2: T2) { p2.input(p1!!) }
fun <T1 , T2 : I<T1 & Any>> foo2(p1: T1, p2: T2) { p2.input(p1!!) }
@@ -36,3 +36,7 @@ class C<TT : Any?> : I<(TT & Any)> {
}
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
p2 /*as I<(T1 & Any)> */.input(t = CHECK_NOT_NULL<T1>(arg0 = p1))
}