Fix tests in DiagnosticsTestWithStdLibGenerated with NI

This commit is contained in:
Dmitriy Novozhilov
2019-01-30 13:08:22 +03:00
parent 98810ba750
commit 0501a108c0
73 changed files with 507 additions and 218 deletions
@@ -1,15 +1,16 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNREACHABLE_CODE -UNUSED_VARIABLE -DEPRECATION
// !WITH_NEW_INFERENCE
inline fun<reified T> foo(block: () -> T): String = block().toString()
inline fun <reified T: Any> javaClass(): Class<T> = T::class.java
fun box() {
val a = <!UNSUPPORTED, REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>arrayOf<!>(null!!)
val a = <!OI;REIFIED_TYPE_FORBIDDEN_SUBSTITUTION, OI;UNSUPPORTED!>arrayOf<!>(null!!)
val b = <!UNSUPPORTED!>Array<!><<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>Nothing?<!>>(5) { null!! }
val c = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!>() { null!! }
val c = <!OI;REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!>() { null!! }
val d = foo<Any> { null!! }
val e = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!> { "1" <!CAST_NEVER_SUCCEEDS!>as<!> Nothing }
val e = <!OI;REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!> { "1" <!CAST_NEVER_SUCCEEDS!>as<!> Nothing }
val e1 = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!> { "1" <!CAST_NEVER_SUCCEEDS!>as<!> Nothing? }
val f = javaClass<<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>Nothing<!>>()