-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add prototype conversion with dependent functions support #8523
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
Add prototype conversion with dependent functions support #8523
Conversation
c5399fd
to
ac4d72b
Compare
ac4d72b
to
075b6dd
Compare
075b6dd
to
fa76c6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am not convinced this will solve the problem. There is some very funky code in the compiler to support dependent implicit conversions. The problem is that eligible implicits are pre-computed and cached. So, Now this is already quite dubious because So, in summary, I would actually be rather glad if we could drop support for dependent conversions once implicit def is phased out. They really don't play well with the implicit search optimizations, so risk to slow down compilation a lot. |
Could you point me to where in the code we do this? |
@smarter It's in |
In any case it's good to have this as a test, to document a possible scheme. |
Instead of writing a
Conversion
aswe would use
which also allows dependent conversion
Conversion
(ConversionFunction
in the test) would be an opaque typeThis alternative definition of
Conversion
would fix the issue stated in #7412.