Is anyone familiar with this and/or can point me t...
# announcements
d
Is anyone familiar with this and/or can point me to some documentation on the subject?
Smart cast to 'String' is impossible because 'myObject.myProperty' is a public API property declared in different module
z
Note that smart casts do not work when the compiler cannot guarantee that the variable cannot change between the check and the usage. More specifically, smart casts are applicable according to the following rules:
https://kotlinlang.org/docs/reference/typecasts.html#smart-casts
d
Oh, I see. I guess I had always been assigning the value to a local variable before. Which would explain why I was not seeing this issue before. Thanks!