Thread overview
[Issue 4140] New: Error: non-constant expression "hello"[1u..__dollar]
May 01, 2010
nfxjfg@gmail.com
Jul 22, 2010
strtr@despam.it
Jan 07, 2011
nfxjfg@gmail.com
Jan 07, 2011
Brad Roberts
Apr 08, 2011
Walter Bright
May 01, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4140

           Summary: Error: non-constant expression "hello"[1u..__dollar]
           Product: D
           Version: 1.057
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: nfxjfg@gmail.com


--- Comment #0 from nfxjfg@gmail.com 2010-05-01 15:24:05 PDT ---
$ cat z.d
const z = "hello";
const h = z[1..$];

$ dmd -c z.d
z.d(2): Error: non-constant expression "hello"[1u..__dollar]

Works with dmd2.
Tested with dmd 1.59 beta (can only select up to 1.057 in bugzilla).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4140


strtr@despam.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |strtr@despam.it


--- Comment #1 from strtr@despam.it 2010-07-21 23:13:35 PDT ---
Just found this one in D1.062 Windows.

Workaround : use z.length iso $.

const A = [1,2,3];
const B = A[1..A.length];

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4140


nfxjfg@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4140


Brad Roberts <braddr@puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |braddr@puremagic.com
         Resolution|WONTFIX                     |


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 08, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4140


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-04-08 09:59:09 PDT ---
https://github.com/D-Programming-Language/dmd/commit/194bac06181bab3ec9b937615f850fbfe28a58a8

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