[Issue 10619] Ambiguous mangling of local variable alias arguments to templates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 27 06:13:42 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=10619
--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Sönke Ludwig from comment #4)
> I assume that this has the same root cause:
>
> ---
> void checkAlias(X...)(int cmp) { assert(X[0] == cmp); }
>
> void main() {
> foreach (j; 0 .. 2) {
> if (j == 0) {
> int i = 42;
> checkAlias!(i)(i); // succeeds (42 == 42)
> } else {
> int i = 13;
> checkAlias!(i)(i); // fails (42 == 13)
> }
> }
> }
> ---
>
> This is a reduced test case of
> https://github.com/rejectedsoftware/vibe.d/issues/863
Yes, it's same issue.
--
More information about the Digitalmars-d-bugs
mailing list