Thread overview
[Issue 5615] New: std.string.indexOf broken at compile time
Feb 19, 2011
Stephan Dilly
Feb 19, 2011
Stephan Dilly
Feb 19, 2011
Stephan Dilly
Jun 11, 2011
Don
February 19, 2011
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


--- Comment #0 from Stephan Dilly <spam@extrawurst.org> 2011-02-19 15:03:49 PST ---
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: -------
February 19, 2011
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: -------
February 19, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5615



--- Comment #1 from Stephan Dilly <spam@extrawurst.org> 2011-02-19 15:05:15 PST ---
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: -------
June 11, 2011
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


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2011-06-11 06:41:11 PDT ---
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: -------