Files
kotlin-fork/compiler/testData/codegen/box/jvm8/defaults/compatibility/deprecatedDefaultMethod.kt
T
Alexander Udalov 116606ecd2 JVM IR: fix class kind of created java.lang.Deprecated symbol
If it isn't ANNOTATION_CLASS, the newly added code in
`FunctionCodegen.isDeprecatedHidden` (0e91d3fcb0) ends up transforming
IR annotation constructor calls to annotation descriptors, and an
assertion fails in `IrBasedDeclarationDescriptor.toAnnotationDescriptor`
which checks that the class has kind ANNOTATION_CLASS.

Specifically, this failed in the JVM IR bootstrap on
`CallResolutionInterceptorExtension.interceptCandidates` from module
'frontend'.
2020-11-11 12:53:32 +01:00

13 lines
222 B
Kotlin
Vendored

// !JVM_DEFAULT_MODE: compatibility
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface I {
@Deprecated("message")
@JvmDefault
fun result() = "OK"
}
fun box(): String = object : I {}.result()