Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.fir.kt
T
Mark Punzalan b8ed46066e FIR: Change diagnostic for ConeHiddenCandidate to UNRESOLVED_REFERENCE.
The KDoc for @Deprecated states that DeprecationLevel.HIDDEN usages
should look like unresolved references.
2021-09-29 19:39:17 +03:00

16 lines
358 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitOperatorMod
// !DIAGNOSTICS: -UNUSED_PARAMETER
object A {
@Deprecated("Use mod instead", ReplaceWith("mod"), DeprecationLevel.HIDDEN)
operator fun rem(x: Int) = 0
operator fun mod(x: Int) = ""
}
fun test() {
takeString(<!ARGUMENT_TYPE_MISMATCH!>A <!UNRESOLVED_REFERENCE!>%<!> 123<!>)
}
fun takeString(s: String) {}