Join Slack
Communities
Powered by
ref this discussion about kotlin smart casts <http...
# announcements
e
e.lislebo
04/08/2020, 6:25 AM
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
David Eriksson
04/08/2020, 2:34 PM
Just assign it to a local variable first?
e
e.lislebo
04/09/2020, 11:39 PM
yea that's what I did, but surely I shouldn't have to?
s
Shawn
04/10/2020, 12:24 AM
did you set your project up so that they actually are in different modules?
e
e.lislebo
04/10/2020, 1:26 PM
Nope, that's why I'm asking
e.lislebo
04/10/2020, 1:27 PM
They're in src/main/kotlin and src/test/kotlin. Entirely ordinary maven setup
Open in Slack
Previous
Next