Move reified type parameter checker to additional checkers to able turn it off by demand

This commit is contained in:
Mikhail Zarechenskiy
2016-11-30 15:53:08 +03:00
parent dc57d69085
commit 240d82d167
4 changed files with 7 additions and 4 deletions
@@ -5,7 +5,7 @@ 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 = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION, UNSUPPORTED!>arrayOf<!>(null!!)
val a = <!UNSUPPORTED, REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>arrayOf<!>(null!!)
val b = <!UNSUPPORTED!>Array<!><<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>Nothing?<!>>(5) { null!! }
val c = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!>() { null!! }
val d = foo<Any> { null!! }