www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 774] New: indexing / slicing a const arrays causes: "Error: non-constant expression"

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=774

           Summary: indexing / slicing a const arrays causes:  "Error: non-
                    constant expression"
           Product: D
           Version: 0.178
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


works:
#
# const A = (["abc", "789"])[0];
#

fails:
#
# const B = ["abc", "789"];
# const C = B[0];
#


-- 
Dec 30 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=774


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3




------- Comment #1 from thomas-dloop kuehne.cn  2006-12-30 20:09 -------
fixed Deskzilla's standard priority


-- 
Dec 30 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=774


strtr despam.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |strtr despam.it
         Resolution|                            |FIXED


--- Comment #2 from strtr despam.it 2010-07-21 23:04:47 PDT ---
Compiles with D1.062

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 21 2010