Prohibit using array based on non-reified type parameters as reified type arguments
#KT-31227 fixed
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNCHECKED_CAST -USELESS_CAST
|
||||
// !LANGUAGE: +ProhibitNonReifiedArraysAsReifiedTypeArguments
|
||||
class A<T>
|
||||
|
||||
fun test1(
|
||||
@@ -49,6 +50,6 @@ fun test6() = <!UNSUPPORTED!>foo<!><Nothing>()
|
||||
|
||||
class B<T>(val array: Array<T>)
|
||||
|
||||
fun <T> bar() = B<Array<T>>(arrayOf())
|
||||
fun <T> bar() = B<Array<T>>(<!TYPE_PARAMETER_AS_REIFIED_ARRAY!>arrayOf<!>())
|
||||
|
||||
fun test7() = <!UNSUPPORTED!>bar<!><Nothing>()
|
||||
|
||||
Reference in New Issue
Block a user