https://issues.dlang.org/show_bug.cgi?id=20901

          Issue ID: 20901
           Summary: arrays confuse static foreach
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

Relevant code: https://run.dlang.io/is/DAkfjA

Depending on whether line 12 (front ~= [ ];) is commented in, one of the
asserts fail. Neither assert should fail.

The code in line 12 does nothing but potentially reallocate an array.

The problem seems not to occur when int[] is replaced by int.

--

Reply via email to