[Issue 10619] Ambiguous mangling of local variable alias arguments to templates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 27 05:17:17 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=10619
Sönke Ludwig <sludwig at outerproduct.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sludwig at outerproduct.org
--- Comment #4 from Sönke Ludwig <sludwig at outerproduct.org> ---
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
--
More information about the Digitalmars-d-bugs
mailing list