Kotlin: Suppress unused property?

My original code looks like this:

There are warnings: the "****" property is never used.

I added "@Suppress (" UNUSED_PARAMETER ")", "@Suppress (" UNUSED_PROPERTY_GETTER ")", "@Suppress (" UNUSED_PROPERTY_SETTER ")",
however none of them work.

How can I suppress this warning?

enter image description here

+3


source to share


1 answer


Use @Suppress("unused")

to suppress an unused warning.



In these cases, you can use an IDE. click alt+enter

: IDE unused suppress

+9


source







All Articles