Why does Intellij complain with `Smart cast to 'st...
# intellij
j
Why does Intellij complain with
Smart cast to 'string' is impossible, because 'token.value' is a public API property declared in different module
? I have a property that returns a
String?
and after a null check could be smart casted to
String
. If I dumb cast it with !! then the compiler warns with:
w: PATH: Unnecessary non-null assertion (!!) on a non-null receiver of type String
. What is a proper solution for this?