It seems like there’s a problem inferring type her...
# announcements
r
It seems like there’s a problem inferring type here. Am I doing something incorrectly?
s
var
makes smart-casting impossible in this case
try swapping your
when
out for this one
Copy code
when(val contained = bindee.containee) {
            is Foo -> bind(contained)
            is Bar -> bind(contained)
        }
💯 2
r
Thanks so much! I should have seen that was the issue
👍 1
Strangely, compilation succeeds, but my IDE says that
None of the following functions can be called with the arguments supplied
s
🤨
bizarre
r
I’m not sure if it’s a lint issue or what
m
It may be because of the new inference engine, which is atm enabled in the IDE, but disabled in the compiler That may warrant creating a new issue in YT
1
r