Files
kotlin-fork/compiler/testData/diagnostics/tests/classLiteral/nonClassesOnLHS.kt
T
Alexander Udalov 4f36376291 Do not report KCLASS_WITH_NULLABLE_ARGUMENT_IN_SIGNATURE anymore
It was only reported in already erroneous cases
2017-01-18 18:21:30 +03:00

21 lines
612 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
class A
val a1 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>A?::class<!>
val a2 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>A??::class<!>
val l1 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>List<String>?::class<!>
val l2 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>List?::class<!>
fun <T : Any> foo() {
val t1 = <!TYPE_PARAMETER_AS_REIFIED!>T::class<!>
val t2 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>T?::class<!>
}
inline fun <reified T : Any> bar() {
val t3 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>T?::class<!>
}
val m = Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>::class