Summary: compiler errors using startsWith in CTFE
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Rainer Schuetze <> 2010-06-13 01:17:32 
PDT ---
the following code fails with dmd 2.047:

import std.algorithm;

const bool var = startsWith("ab", "a");

dmd output:

c:\l\dmd2\windows\bin\..\..\src\phobos\std\functional.d(176): Error: static
assert  "Bad binary function q{a == b}. You need to use a valid D expression
using symbols a of type dchar and b of type string."
instantiated from here: Body!(dchar,string)
instantiated from here: result!(dchar,string)

the error disappears if you remove the "const".

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

Reply via email to