digitalmars.D.bugs - [Issue 21077] New: Order of evaluation of associative array is
- d-bugmail puremagic.com (30/30) Jul 25 2020 https://issues.dlang.org/show_bug.cgi?id=21077
https://issues.dlang.org/show_bug.cgi?id=21077 Issue ID: 21077 Summary: Order of evaluation of associative array is compiler-dependent Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: pro.mathias.lang gmail.com ``` import std.stdio; int foo () { static int i; return ++i; } void main () { writeln([ foo(): foo(), foo(): foo() ]); } ``` ``` % dmd -run ooe.d [2:4, 1:3] % ldc2 -run ooe.d [3:4, 1:2] ``` GDC also does something different. --
Jul 25 2020