-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully Qualified Names are not allowed in type signatures #8997
Comments
The reason it works in that case is that the fully-qualified name in the snippet
is resolved at runtime. Whereas the fully-qualified names in type signatures are resolved during compilation. More specifically, in the TypeNames compiler pass. I was able to pinpoint the exact failure in resolution in |
Enso always wanted to support dependent types...
... to simplify: there is no difference between value and type treatment. Why not resolve the FQN at runtime as well? |
Because where possible we still want to do static analysis, no? If I can resolve something at compile time, I can report an error to the user and find typos much faster. Deferring to runtime may even cause such errors to be completely unnoticed if a relevant test does not cover enough execution paths. |
In addition to what @radeusgd already mentioned, all the necessary information is already present in |
I am not 100% sure and I don't think I ever claimed that or agreed to that.
It may slow down the start...
...may speed startup significantly. |
Repro:
This seems like a completely valid program, but it fails to compile with:
If I replace the FQNs with just
Integer
it runs all fine.I don't see any reason why FQNs should not be allowed in type signatures. In fact it is rather confusing.
Note that the exact same FQN used as value works all fine:
printing
The text was updated successfully, but these errors were encountered: