Files
kotlin-fork/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt
T
Alexander Udalov 2e4592c6dc Report error on bound callable references in compatibility mode
Previously examples were failing with IllegalStateException from JVM back-end
because there was an error type without any error reported
2016-10-11 17:30:10 +03:00

15 lines
367 B
Kotlin
Vendored

// !LANGUAGE: -BoundCallableReferences
class C { companion object }
val ok1 = C::class
val ok2 = C.Companion::class
object O
val ok3 = O::class
val fail1 = <!UNSUPPORTED_FEATURE!>""<!>::class
val fail2 = <!CLASS_LITERAL_LHS_NOT_A_CLASS!>String?::class<!>
val fail3 = <!UNSUPPORTED_FEATURE!>(C)<!>::class
val fail4 = <!UNSUPPORTED_FEATURE!>(C.Companion)<!>::class