D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10811 - Order dependent IFTI failure
Summary: Order dependent IFTI failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-08-12 13:17 UTC by Kenji Hara
Modified: 2013-08-15 23:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2013-08-12 13:17:13 UTC
With both version = ng and ok, the code should be compiled successfully.

version (ng)
{
    void foo(R1, R2)(R1 r1, R2 r2) {}
    template foo(alias pred) { void foo(R1, R2)(R1 r1, R2 r2) {} }
}
version (ok)
{
    template foo(alias pred) { void foo(R1, R2)(R1 r1, R2 r2) {} }
    void foo(R1, R2)(R1 r1, R2 r2) {}
}
void main()
{
    foo(1, 2);
    foo!(a => a)(1, 2);
}
Comment 2 github-bugzilla 2013-08-13 02:34:14 UTC
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/bf9676b0cf75c2e16c2f485e06eefd3fd0ee234b
Remove conflict template function

By fixing bug 10811, both toUTFz template functions will conflict on the call `toUTFz!(T)(str)`. Remove one to resolve ambiguity.

https://github.com/D-Programming-Language/phobos/commit/82085781b0b18b4a799f0727e80aadb41b3369d5
Merge pull request #1473 from 9rnsr/fix10811

Supplemental fix for issue 10811 - Remove conflict template function
Comment 3 github-bugzilla 2013-08-15 23:23:44 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0cefbdccbc755415fb31966b17973c51fc707610
fix Issue 10811 - Order dependent IFTI failure

https://github.com/D-Programming-Language/dmd/commit/a5c9b9ae4c25aea71153f162ed7026f561061e28
Merge pull request #2472 from 9rnsr/fix10811

Issue 10811 - Order dependent IFTI failure