[FIR] Render deprecation message if it's not a named argument.
This commit is contained in:
committed by
Space Team
parent
8aa32d9f45
commit
6b049df87c
@@ -0,0 +1,9 @@
|
||||
/deprecatedError.kt:10:13: error: using 'C' is an error. alas
|
||||
fun test(c: C) {
|
||||
^
|
||||
/deprecatedError.kt:11:5: error: using 'foo(String): Unit' is an error. alas
|
||||
foo("")
|
||||
^
|
||||
/deprecatedError.kt:12:5: error: using 'C' is an error. alas
|
||||
C()
|
||||
^
|
||||
@@ -0,0 +1,5 @@
|
||||
/deprecatedError.kt:(237,238): error: '@Deprecated(...) class C : Any' is deprecated. alas.
|
||||
|
||||
/deprecatedError.kt:(246,249): error: '@Deprecated(...) fun foo(s: @R|Foo|() String): Unit' is deprecated. alas.
|
||||
|
||||
/deprecatedError.kt:(258,259): error: 'constructor(): C' is deprecated. alas.
|
||||
@@ -1,12 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
@Deprecated("alas", level = DeprecationLevel.ERROR)
|
||||
fun foo() {}
|
||||
fun foo(s: @Foo String) {}
|
||||
|
||||
@Deprecated("alas", level = DeprecationLevel.ERROR)
|
||||
class C
|
||||
|
||||
fun test(c: <!DEPRECATION_ERROR!>C<!>) {
|
||||
<!DEPRECATION_ERROR!>foo<!>()
|
||||
<!DEPRECATION_ERROR!>foo<!>("")
|
||||
<!DEPRECATION_ERROR!>C<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Foo
|
||||
@@ -1,11 +0,0 @@
|
||||
package
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "alas") public fun foo(): kotlin.Unit
|
||||
public fun test(/*0*/ c: C): kotlin.Unit
|
||||
|
||||
@kotlin.Deprecated(level = DeprecationLevel.ERROR, message = "alas") public final class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user