[K2] Disappeared UNSUPPORTED
Prohibit Array<Nothing> ^KT-59881
This commit is contained in:
committed by
Space Team
parent
73a0b4eaf2
commit
85cff98a38
@@ -1,6 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNCHECKED_CAST -USELESS_CAST
|
||||
// !LANGUAGE: +ProhibitNonReifiedArraysAsReifiedTypeArguments
|
||||
class A<T>
|
||||
class C<T, G>
|
||||
class D<T>
|
||||
|
||||
fun test1(
|
||||
a: <!UNSUPPORTED!>Array<Nothing><!>,
|
||||
@@ -8,8 +10,12 @@ fun test1(
|
||||
c: <!UNSUPPORTED!>Array<in Nothing><!>,
|
||||
d: <!UNSUPPORTED!>Array<in Nothing?><!>,
|
||||
e: <!UNSUPPORTED!>Array<out Nothing><!>,
|
||||
f: <!UNSUPPORTED!>Array<out Nothing?><!>
|
||||
) {}
|
||||
f: <!UNSUPPORTED!>Array<out Nothing?><!>,
|
||||
g: C<String, <!UNSUPPORTED!>Array<Nothing><!>>,
|
||||
h: A<D<<!UNSUPPORTED!>Array<Nothing><!>>>
|
||||
) {
|
||||
<!UNSUPPORTED!>A<!><D<<!UNSUPPORTED!>Array<Nothing><!>>>()
|
||||
}
|
||||
|
||||
fun test2(
|
||||
a: <!UNSUPPORTED!>Array<Nothing><!>?,
|
||||
@@ -47,7 +53,6 @@ fun <T> foo(): Array<T> = (object {} as Any) as Array<T>
|
||||
|
||||
fun test6() = <!UNSUPPORTED!>foo<!><Nothing>()
|
||||
|
||||
|
||||
class B<T>(val array: Array<T>)
|
||||
|
||||
fun <T> bar() = B<Array<T>>(<!TYPE_PARAMETER_AS_REIFIED_ARRAY_ERROR!>arrayOf<!>())
|
||||
|
||||
Reference in New Issue
Block a user