Summary: Aliasing an element of a static array should be legal
                    if the index is a compile time constant
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2009-11-23 18:04:51 PST ---
uint[3] foo;
alias foo[0] bar;

test8.d(2): Error: alias cannot alias an expression foo[0]

Since foo is a static array and 0 is a compile time constant, there is no
reason this shouldn't work.  It works with tuples, and static arrays really
should offer a superset of tuple functionality because they are implemented the
same way as tuples with all the same type.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to