Prohibit Array<Nothing>

This commit is contained in:
Alexey Tsvetkov
2015-11-27 12:57:34 +03:00
parent 35f788a89c
commit 7384d25cb3
8 changed files with 154 additions and 5 deletions
@@ -3,8 +3,8 @@
inline fun<reified T> foo(block: () -> T): String = block().toString()
fun box() {
val a = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>arrayOf<!>(null!!)
val b = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>Array<!><Nothing?>(5) { null!! }
val a = <!UNSUPPORTED!><!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>arrayOf<!>(null!!)<!>
val b = <!UNSUPPORTED!><!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>Array<!><Nothing?>(5) { null!! }<!>
val c = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!>() { null!! }
val d = foo<Any> { null!! }
val e = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!> { "1" as Nothing }