July 13, 2014 [Issue 13122] New: std.algorithm.cartesianProduct output type immutability | ||||
|---|---|---|---|---|
| ||||
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: nobody@puremagic.com Reporter: bearophile_hugs@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) -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply