www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5615] New: std.string.indexOf broken at compile time

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

           Summary: std.string.indexOf broken at compile time
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: spam extrawurst.org



---
This is a regression. The code used to work in dmd2.051:

import std.string:indexOf;

static assert(indexOf("foobar","foo")==0);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 19 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5615


Stephan Dilly <spam extrawurst.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
           Severity|normal                      |regression


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 19 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5615




---
in dmd2.052 it says:

\src\phobos\std\string.d(578): Error: cast(const(char)*)balance cannot be
interpreted at compile time
main.d(6): Error: cannot evaluate indexOf("foobar","foo",cast(CaseSensitive)1)
at compile time
main.d(6): Error: static assert  (indexOf("foobar","foo",cast(CaseSensitive)1)
== 0) is not evaluatable at compile time

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 19 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5615


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/dmd/commit/610d4fe1cf8aeaf8f04d5f32ccce72ab827b1f25

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