-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Change is volatile 2 #1072
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
Merged
Merged
Change is volatile 2 #1072
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last commit LGTM, thanks |
Changes needed to support simple named type parameters. Not yet implemented: named arguments.
Types#underlyingClassRef and PostTyper#normalizeTree need to be changed so they can deal with partial named parameter lists.
After unpickling we might see an alias X = pre.X where pre =:= the ThisType of the enclosing class. But it might not be `eq` to it.
Named parameters cause some elements to be unpickled in a different order as they are pickled. In particular term parameter aliases and type parameter aliases seem to be swapped.
There is a before/after difference having to do with the order in which class declarations show up.
Needs to work also if named arg refers to an abstract type, not a parameter.
We had same fleyness in number of errors of cycle.scala which prompted this.
Also, add an unrelated test file to pos.
Was not fixed by accident then, so we do it here now.
The current Scala spec only considers methods without default parameters for overloading resolution (unless only a single one remains anyway after filtering by shape). This is needlessly restrictive. But dropping this restriction (as dotty does) can lead to ambiguity errors, which is why run/t8197 did not compile anymore. We fix the problem by a last try rule: If after asSpecific tests there are still several alternatives, and only one of them is without default arguments, pick that one. I tried an alternative rule which would make the distinction on default params earlier but that one fails for the overloaded tree copier functions in Trees.scala (the method with default parameters is also the one which is more specific).
Lets one also pass named arguments to methods.
Addendum to change-isVolatile. Changes did not make it in by accident before that branch was merged.
bd91eb0
to
cecaa4b
Compare
Rebased to master. If tests pass I am getting this merged now. I am losing too many cycles with constant rebasing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Only last commit is new. Rest is based on add-named-params. Both branches conflict a lot
in PostTyper/Checker. So I thought it best to immediately base on last commit instead of
going through another painful rebase.
Review by @smarter