Files
kotlin/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.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

12 lines
408 B
Kotlin
Vendored

// !LANGUAGE: -BoundCallableReferences
// !DIAGNOSTICS: -UNCHECKED_CAST
import kotlin.reflect.KClass
val <T : Any> KClass<T>.java: Class<T> get() = null!!
val <T : Any> KClass<T>.javaObjectType: Class<T>
get() {
return java.<!UNRESOLVED_REFERENCE!>lang<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>Class<!>::class.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>java<!> <!USELESS_CAST!>as Class<T><!>
}