Hi all, not sure if this is the correct place to r...
# intellij
l
Hi all, not sure if this is the correct place to report this. I am using Kotlin plugin 1.1.2 with Android Studio 2.3-3. I wrote:
if (x !is String) return
and the IDE suggested that I should replace
if
operator with elvis. I tried replacing it with
(x is String) ?: return
but got a warning "Elvis operator always returns the left operand of non-nullable type Boolean". The same statement produces the same error in try.kotlinlang.org.
y
liminal: Any time the IDE shows such a suggestion, you can press Alt-Enter to have it apply the suggested change automatically
💯 1
l
Thanks, Dmitry!