https://issues.dlang.org/show_bug.cgi?id=12501
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|FIXED |--- --- Comment #4 from [email protected] --- Was this fixed? I can reproduce it with this case: //---- void main() { import std.algorithm: min, max, reduce; import std.typecons: tuple; dchar c = 'a'; reduce!(min, max)(tuple(c, c, c), "hello"); // OK } //---- dmd: statement.c:713: ErrorStatement::ErrorStatement(): Assertion `global.gaggedErrors || global.errors' failed. Aborted (core dumped) //---- Or, reduced to: //---- import std.traits, std.functional; template reduce(fun...) { auto reduce(Seed)(Seed result) { foreach (i, Unused; Seed.Types) result[i] = binaryFun!(fun[i])(1, 1); //Here return result; } } void main() { import std.typecons: tuple; reduce!("a", "a")(tuple(1, 1, 1)); } //---- I think the root issue is in: result[i] = binaryFun!(fun[i])(1, 1); //Here Changing to either: auto a = binaryFun!(fun[i])(1, 1); or result[i] = fun[i](1, 1); Allows it to "fail correctly" ... Or is it a different issue? --
