Enable DefinitelyNotNullTypeParameters since 1.7
^KT-26245 In Progress
This commit is contained in:
committed by
teamcityserver
parent
c1b5d5551f
commit
9e6af52e1f
@@ -12,7 +12,7 @@ fun <S : Any?> select(x: S, y: S): S {
|
||||
}
|
||||
|
||||
fun <T : Any?> foo(a: Array<In<T>>, b: Array<In<String>>): Boolean {
|
||||
return select<Array<out In<Nothing>>>(x = a, y = b).get(index = 0).ofType<Any>(y = true)
|
||||
return select<Array<out In<Nothing>>>(x = a, y = b).get(index = 0).ofType<Any?>(y = true)
|
||||
}
|
||||
|
||||
inline fun <reified K : Any?> In<K>.ofType(y: Any?): Boolean {
|
||||
|
||||
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/intersectionType1_NI.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>'
|
||||
CALL 'public final fun ofType <K> (y: kotlin.Any?): kotlin.Boolean [inline] declared in <root>' type=kotlin.Boolean origin=null
|
||||
<K>: kotlin.Any
|
||||
<K>: kotlin.Any?
|
||||
$receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array [operator] declared in kotlin.Array' type=<root>.In<kotlin.Nothing> origin=null
|
||||
$this: CALL 'public final fun select <S> (x: S of <root>.select, y: S of <root>.select): S of <root>.select declared in <root>' type=kotlin.Array<out <root>.In<kotlin.Nothing>> origin=null
|
||||
<S>: kotlin.Array<out <root>.In<kotlin.Nothing>>
|
||||
|
||||
@@ -12,7 +12,7 @@ fun <S : Any?> select(x: S, y: S): S {
|
||||
}
|
||||
|
||||
fun <T : Any?> foo(a: Array<In<T>>, b: Array<In<String>>): Boolean {
|
||||
return select<Array<out In<Nothing>>>(x = a, y = b).get(index = 0).ofType<Any>(y = true)
|
||||
return select<Array<out In<Nothing>>>(x = a, y = b).get(index = 0).ofType<Any?>(y = true)
|
||||
}
|
||||
|
||||
inline fun <reified K : Any?> In<K>.ofType(y: Any?): Boolean {
|
||||
@@ -24,3 +24,4 @@ fun test() {
|
||||
val a2: Array<In<String>> = arrayOf<In<String>>(elements = [In<String>()])
|
||||
foo<Int>(a = a1, b = a2) /*~> Unit */
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ FILE fqName:<root> fileName:/intersectionType1_OI.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>'
|
||||
CALL 'public final fun ofType <K> (y: kotlin.Any?): kotlin.Boolean [inline] declared in <root>' type=kotlin.Boolean origin=null
|
||||
<K>: kotlin.Any
|
||||
<K>: kotlin.Any?
|
||||
$receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array [operator] declared in kotlin.Array' type=<root>.In<kotlin.Nothing> origin=null
|
||||
$this: CALL 'public final fun select <S> (x: S of <root>.select, y: S of <root>.select): S of <root>.select declared in <root>' type=kotlin.Array<out <root>.In<kotlin.Nothing>> origin=null
|
||||
<S>: kotlin.Array<out <root>.In<kotlin.Nothing>>
|
||||
|
||||
Reference in New Issue
Block a user