Summary: RegexMatch opCast!bool not working
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Jerry Quinn <> 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:
------- You are receiving this mail because: -------

Reply via email to