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 13484 - Template type deduction from delegate parameter fails #4000

Merged
merged 1 commit into from Sep 19, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Sep 17, 2014

https://issues.dlang.org/show_bug.cgi?id=13484

The implicit conversion of expressions to delegates was added in 0.165 (a2b1fa4, http://www.digitalmars.com/d/1.0/changelog2.html#new0165), but it was replaced with lazy parameter.

The implicit conversion of expressions to delegates was added in 0.165 (a2b1fa4, http://www.digitalmars.com/d/1.0/changelog2.html#new0165), but it was replaced with lazy parameter.
@dnadlinger
Copy link
Member

Auto-merge toggled on

@dnadlinger
Copy link
Member

I couldn't think of any examples, but to be sure: Is there any chance for this to trigger a change in template resolution behavior for instantiations that already compile (which we'd need to prominently discuss in the release notes)?

@9rnsr
Copy link
Contributor Author

9rnsr commented Sep 19, 2014

@klickverbot No. Since IFTI had accepted such delegate parameter, but deduced function signature has been checked again like a normal function call by using TypeFunction::callMatch, and it had correctly rejected the invalid function call.

https://github.com/D-Programming-Language/dmd/blob/master/src/template.c#L2479

So no existing accepted code will be rejected.

dnadlinger added a commit that referenced this pull request Sep 19, 2014
Issue 13484 - Template type deduction from delegate parameter fails
@dnadlinger dnadlinger merged commit c83986a into dlang:master Sep 19, 2014
@9rnsr 9rnsr deleted the fix13484 branch September 20, 2014 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants