[Issue 16994] Apparently faulty symbol resolution in some cases
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jan 8 14:11:55 PST 2017
https://issues.dlang.org/show_bug.cgi?id=16994
--- Comment #3 from Martin Nowak <code at dawg.eu> ---
Seems to be a duplicate of issue 14894, only in this case the 2 compilations
produce different functions with the same mangling instead of causing a linker
error.
It just happens that in both compilations a lambda with the same number
(__lambda21) is passed to varreduce paired with the same argument types, the
linker will just pick the implementation that occurs first.
A workaround is to convert the lambdas
alias VarReduceMin = (a, b) => (a < b ? a : b);
to template functions.
auto VarReduceMin(A, B)(A a, B b) { return (a < b ? a : b); }
--
More information about the Digitalmars-d-bugs
mailing list