I am trying to create a custom get
and set
method but I would like to suppress the inspections warning Function should have 'operator' modifier
only for these specific functions.
The following did not work:
@Suppress("operator")
suspend fun get(key: K): V?
@Suppress("operator")
suspend fun set(key: K, value: V): String?
CodePudding user response:
You will find the option "Suppress 'AddOperatorModifier' for fun get". Choosing it will insert the line:
@Suppress("AddOperatorModifier")
The inspection can also be disabled globally in the IntelliJ settings: