-
Notifications
You must be signed in to change notification settings - Fork 10
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
Explicitly disallow importing an identifier whose type needs to be inferred #5
Comments
Good catch. Importing from terms with inferred types should be disallowed. |
In your blog post you mentioned that no Scala language feature prevents the use of outline types, but isn't that contradicted by the fact that you have to introduce restrictions like this? How would you deal with this in a real compiler? |
In the blog post introducing outline types I discussed the difficulty of vals mentioned in paths:
At the time, I thought that vals with inferred types has to be only disallowed from appearing in paths. I missed import nodes. Kentucky Mule is about exploiting a clear boundary between declaration typechecking and expression typechecking for improving the overall speed of typechecking. This boundary almost already exists in Scala except a few cases we're now identifying. I'm pretty sure Scala users would be willing to give up on inferred types connivence in some cases (in paths and in imports) if they were promised 10x compiler speed upgrade in return. |
I agree, just thought that this needed to be clarified :) |
The following code:
fails with:
It seems that either importing from something with type
InferredTypeMarker
should be disallowed or that everything in scope after such an import should get typeInferredTypeMarker
.The text was updated successfully, but these errors were encountered: