Lukellmann
07/19/2022, 1:12 PMHIDDEN
?
for WARNING
and ERROR
you can do this:
@Deprecated("w", level = DeprecationLevel.WARNING)
val w = "w"
@Deprecated("e", level = DeprecationLevel.ERROR)
val e = "e"
@Deprecated("h", level = DeprecationLevel.HIDDEN)
val h = "h"
println(@Suppress("DEPRECATION") w)
println(@Suppress("DEPRECATION_ERROR") e)
println(@Suppress("?? what goes here ??") h)
zsmb
07/19/2022, 2:12 PMLukellmann
07/19/2022, 2:13 PMzsmb
07/19/2022, 2:16 PMLukellmann
07/19/2022, 2:18 PMzsmb
07/19/2022, 2:19 PMLukellmann
07/19/2022, 2:23 PMilya.gorbunov
07/20/2022, 3:56 PM@Suppress("DEPRECATION_ERROR")
in places where a deprecated-hidden class is still used in your API, but note that it is a suppression of an error and hence there are no guarantees that it will continue to work this way (see KT-24783). However, if we change how Suppress works, we'll still provide some other way to suppress deprecation errors.