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

Issue 5896 - const overload matching is succumb to template parameter one #45

Merged
merged 2 commits into from
May 12, 2012

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Apr 27, 2011

@WalterBright
Copy link
Member

I don't think this solution is correct. The 'this' and the template parameters should participate equally in the overloading process.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jun 19, 2011

Improved. Separate and prefer 'ethis' matching from tiargs matching instead add match level.

@WalterBright
Copy link
Member

This is much better. But I disagree with the rationale for preferring an ethis match. The ethis matching should act as just another parameter as far as overload matching goes.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 2, 2011

The 3rd try.
If the results of td->leastAsSpecialized() are same, run semantic, get FuncDeclaration, and compare results of tf->callMatch and fd->leastAsSpecialized().

1st try 9rnsr@9967e84
2nd try 9rnsr@4dd398d

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 2, 2011

Sorry, I found a test-case that does not work properly. 3rd try is invalid.

@9rnsr
Copy link
Contributor Author

9rnsr commented Jul 3, 2011

3rd re-try. Deducing function template process has two steps to shrink overload set.

  1. Shrink template overloads by specified template arguments.
  2. Shrink template function overloads by inferred template arguments from function arguments.
    I think that reason of issue 5896 is by mixing them.

braddr pushed a commit to braddr/dmd that referenced this pull request Sep 15, 2011
temporarily disable std/container on freebsd64
9rnsr added 2 commits March 24, 2012 17:51
…eter one

Treat matching levels separately based on initial template arguments and inferred from function arguments.
@9rnsr
Copy link
Contributor Author

9rnsr commented Mar 24, 2012

Added fix for bug 4953.
As I talked in here, I think #239 is the right way for bug 4953. And this pull doesn't need to increase matching levels, as like #269.

@WalterBright , I'm sure it is time to fix these two bugs.

WalterBright added a commit that referenced this pull request May 12, 2012
Issue 5896 - const overload matching is succumb to template parameter one
@WalterBright WalterBright merged commit f21d0cc into dlang:master May 12, 2012
MartinNowak pushed a commit to MartinNowak/dmd that referenced this pull request Apr 5, 2014
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.

2 participants