http://d.puremagic.com/issues/show_bug.cgi?id=7301

           Summary: RegexMatch opCast!bool not working
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: jlqu...@optonline.net


--- Comment #0 from Jerry Quinn <jlqu...@optonline.net> 2012-01-16 19:12:04 PST 
---
Ubuntu 11.10 x86_64, dmd 2.057

bug2.d contains:

import std.regex;
bool foo() {
  auto re = regex("test");
  return match("test", re);
}

~/dmd2/linux/bin32/dmd -c bug2.d
bug2.d(4): Error: cannot implicitly convert expression (match("test",re)) of
type RegexMatch!(string,ThompsonMatcher) to bool

It works if I use match("test", re).empty

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

Reply via email to