Files
kotlin/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt
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
396 B
Kotlin
Vendored

// !LANGUAGE: -BoundCallableReferences
class C { companion object }
val ok1 = C::hashCode
val fail1 = <!UNSUPPORTED_FEATURE!>C.Companion<!>::hashCode
object O
val fail2 = <!UNSUPPORTED_FEATURE!>O<!>::hashCode
fun hashCode() {}
val fail3 = <!UNSUPPORTED_FEATURE!>""<!>::hashCode
val fail4 = <!UNSUPPORTED_FEATURE!>(C)<!>::hashCode
val fail5 = <!UNSUPPORTED_FEATURE!>(C.Companion)<!>::hashCode