https://issues.dlang.org/show_bug.cgi?id=13122
Issue ID: 13122 Summary: std.algorithm.cartesianProduct output type immutability Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nob...@puremagic.com Reporter: bearophile_h...@eml.cc void main() { import std.algorithm: cartesianProduct; immutable a = "ABC"; foreach (t1; cartesianProduct(a, a)) pragma(msg, typeof(t1)); immutable b = "ABC"d; foreach (t2; cartesianProduct(b, b)) pragma(msg, typeof(t2)); } The latest dmd 2.066beta3 outputs: Tuple!(dchar, dchar) Tuple!(immutable(dchar), immutable(dchar)) Expected output: Tuple!(dchar, dchar) Tuple!(dchar, dchar) --