Skip to content
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

Fix #6385: Don't instantiate hk type constructors too early #6467

Merged
merged 6 commits into from
May 17, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 6, 2019

The issue #6385 contains more explanations.

@odersky
Copy link
Contributor Author

odersky commented May 6, 2019

test performance please

@dottybot
Copy link
Member

dottybot commented May 6, 2019

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

@dottybot
Copy link
Member

dottybot commented May 6, 2019

Performance test finished successfully:

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

Benchmarks is based on merging with master (b34ea5d)

@odersky
Copy link
Contributor Author

odersky commented May 7, 2019

test performance please

@dottybot
Copy link
Member

dottybot commented May 7, 2019

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

@dottybot
Copy link
Member

dottybot commented May 7, 2019

Performance test finished successfully:

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

Benchmarks is based on merging with master (b34ea5d)

odersky and others added 6 commits May 17, 2019 12:14
Before searching for implicit arguments, if a the constraint
contains a type parameter
```
   P >: A <: B
```
where `P` occurs in the searched-for type and `A =:= B`, change the constraint
to
```
   P := B
```
instead. This improves the implicit search by making the searched-for type
have fewer uninstantiated type variables.
Avoid formation of full bounds.
In fact, the isLess relation is irrelevant here. If

  p >: L <: H   and  L =:= H

and the constraint is satisfiable, then it's safe to replace p by L or H
anyway, no matter what other parameters are known to be smaller or larger
than p.
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased and fixed compilation after the merge of #5736.
This LGTM and it also happens to fix #4147 which I had been puzzling over for a while, awesome!

@smarter smarter added this to the 0.15 Tech Preview milestone May 17, 2019
@smarter smarter merged commit 24946d8 into scala:master May 17, 2019
@allanrenucci allanrenucci deleted the fix-#6385 branch May 17, 2019 11:47
griggt added a commit to griggt/dotty that referenced this pull request Oct 22, 2020
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.

None yet

3 participants