https://issues.dlang.org/show_bug.cgi?id=12569
--- Comment #1 from [email protected] --- (In reply to bearophile_hugs from comment #0) > This code compiles: > > void main() { > import std.algorithm: min, max, reduce; > import std.typecons: tuple; > dchar c = 'a'; > reduce!(min, max)(tuple(c, c), "hello"); // OK > } > > > But here I have forgotten to use a 2-tuple as seed for reduce: > > void main() { > import std.algorithm: min, max, reduce; > import std.typecons: tuple; > dchar c = 'a'; > reduce!(min, max)(c, "hello"); // error > } I'd be more worried about passing too *many* arguments, eg: reduce!(min, max)(tuple(c, c, c), "hello"); Technically, implementation-wise, it *should* pass, but it doesn't make sense to accept it. Currently, in HEAD, this code ices the compiler. My reduce re-write just accepts it. I'll add your test(s) to it. --
