Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin: Suppress unused Property?

My source code is as follows:

There are warnings : 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

like image 484
user3239558 Avatar asked Apr 03 '17 18:04

user3239558


1 Answers

Use @Suppress("unused") in order to suppress unused warning.

For those cases you can use the IDE. press alt+enter: IDE unused suppress

like image 190
Yoav Sternberg Avatar answered Oct 21 '22 11:10

Yoav Sternberg