Files
kotlin/compiler/testData/diagnostics/tests/annotations/rendering/multipleInheritedDefaults.kt
Pavel Kirpichenkov b7e5d9faae Update annotation rendering in diagnostics
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
2019-10-04 11:18:45 +03:00

26 lines
767 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_MESSAGES
// !DIAGNOSTICS: -ABSTRACT_MEMBER_NOT_IMPLEMENTED
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY, AnnotationTarget.EXPRESSION)
@Retention( AnnotationRetention.SOURCE)
annotation class An
@An
interface A {
@An
fun foo(@An a: @An Int = @An 1)
}
@An
interface B {
@An
fun foo(@An a: @An Int = @An 2)
}
<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE("value-parameter a: Int = ... defined in AB1.foo")!>class AB1<!> : A, B
@An
class AB2 : A, B {
@An
override fun foo(<!MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES("value-parameter a: Int = ... defined in AB2.foo")!>@An a: @An Int<!>) {}
}