ref this discussion about kotlin smart casts <http...
# announcements
e
ref this discussion about kotlin smart casts https://discuss.kotlinlang.org/t/what-is-the-reason-behind-smart-cast-being-impossible-to-perform-when-referenced-class-is-in-another-module/2201 when the class in a different module (i.e. artefact that can evolve independently) I agree with the language designers. But it seems like kotlin believes that my tests and my "real" code are in different modules. Is this intentional somehow, or is it a bug?
d
Just assign it to a local variable first?
e
yea that's what I did, but surely I shouldn't have to?
s
did you set your project up so that they actually are in different modules?
e
Nope, that's why I'm asking
They're in src/main/kotlin and src/test/kotlin. Entirely ordinary maven setup