Join Slack
<@UQ8NE6A86> Not sure if this is intended or a bug, but in the IDE a smart-cast works that fails in ...
# datascience
h
holgerbrandl
07/15/2021, 6:41 AM
@Ilya Muradyan
Not sure if this is intended or a bug, but in the IDE a smart-cast works that fails in jupyter:
i
Ilya Muradyan
07/15/2021, 6:51 AM
Where the class of
it
is declared in both cases? I believe that if you define it in the same cell, everything should be fine. See also
https://discuss.kotlinlang.org/t/what-is-the-reason-behind-smart-cast-being-impossible-to-perform-when-referenced-class-is-in-another-module/2201
h
holgerbrandl
07/15/2021, 7:04 AM
In a jar dependency that I load with @file:DependsOn. Not sure how to do it differently.
a
altavir
07/15/2021, 7:30 AM
Smart-casts usually do not work for external dependencies. Maybe this is the problem.
i
Ilya Muradyan
07/15/2021, 7:33 AM
So, that's the reason, I believe
Ilya Muradyan
07/15/2021, 7:34 AM
Jar dependency is obviously an external module
h
holgerbrandl
07/15/2021, 8:14 AM
Got it. Thanks for your help
4
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by