Skip to content

Remove substDealias #4243

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 1 commit into from
May 7, 2018
Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Apr 4, 2018

Does not seem to be needed anymore.

Does not seem to be needed anymore.
@smarter
Copy link
Member Author

smarter commented Apr 4, 2018

test performance please

@dottybot
Copy link
Member

dottybot commented Apr 4, 2018

performance test scheduled: 112 job(s) in queue, 1 running.

@smarter smarter requested a review from odersky April 4, 2018 15:05
@dottybot
Copy link
Member

dottybot commented Apr 4, 2018

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4243/ to see the changes.

Benchmarks is based on merging with master (4c8a2bd)

@odersky
Copy link
Contributor

odersky commented Apr 4, 2018

I am not sure. SubstDealias was needed when we modeled parameters as refinements. But inprinciple the same configurations could arise through explicit refinements. How do we know
this cannot lead to problems? I am worried about scenarios like

[foo := bar]  P { type T = foo } # T

Oh I see, that will in fact replace the foo and we are good. So let's try again:

val x: P { type T = foo }
[foo := bar] x.T

What about this one?

@smarter
Copy link
Member Author

smarter commented Apr 4, 2018

Hmm, but then just dealiasing does not seem to be enough to handle all cases, e.g. what about:

val x: P { type T = foo }
type S <: x.T
[foo := bar] S

@odersky
Copy link
Contributor

odersky commented Apr 5, 2018

@smarter Good point. Can we construct a test case out of this, or is there something else that means we don't substitute in situations like this? If we can't construct a test case I agree we should drop substDealias anyway in order to fail faster.

@allanrenucci allanrenucci merged commit c63623f into scala:master May 7, 2018
@allanrenucci allanrenucci deleted the remove/substDealias branch May 7, 2018 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants