Summary: False hijacking error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrei Alexandrescu <> 2012-05-04 
07:01:06 PDT ---

import std.regex, std.string;

void main() {
    split(s"hello", regex("[ \t,.;:?]+"));

The compiler complains:

test.d(5): Error: std.regex.split(String,RegEx) if (isSomeString!(String) &&
isRegexFor!(RegEx,String)) at /Users/aalexandre/code/d/phobos/std/regex.d(6796)
conflicts with std.string.split at

However, line 60 in std.string just aliases split to std.array.split. In turn,
std.array defines two split functions, neither of which accepts a regex in the
second position. So there is no potential hijacking.

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

Reply via email to