Context sensitive resolution: why doesn’t it work ...
# language-evolution
s
Context sensitive resolution: why doesn’t it work for classes in sealed hierarchies?
IMG_4548.png
c
It doesn't work for function calls. I think it would work if it was just an
object
? Here, your best bet is probably a static import
s
Yes it works for objects
See my example
Why can’t it work for constructor invocations?
c
It's not that it can't, it's that it was judged that function calls (including constructors) would be too confusing if they were implicitly implied.
a
As @CLOVIS mentions, context-sensitive resolution does not work on function calls in general. The main design reason for this is that it can make the search (and compilation time) blow up; right now only "things without parameters" are context-sensitive looked up
s
👍🏻