MustUseReturnValue

Marks the scope (file or class) in which all the functions are non-ignorable. Kotlin's return value checker would report warning in case the result of non-ignorable function call is not used.

This annotation is usually placed by the Kotlin compiler itself when the corresponding 'Return value checker' feature is set to the 'full' mode. There is no need to place it manually except for certain migration scenarios.

This annotation only makes sense when used together with 'Return value checker' feature. Placing it without enabling the corresponding feature would result in a compiler error.

Since Kotlin

2.2