www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10802] New: std.regex: ctRegex fails to compile with backreference

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10802

           Summary: std.regex: ctRegex fails to compile with backreference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dmitry.olsh gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-08-11
14:04:41 PDT ---
Test-case:

import std.algorithm, std.regex;

void main()
{
    auto cr = ctRegex!`(a)b\1`;
    auto m = match("abaab", cr); 
    assert(m);
    assert(m.hit == "aba");
}

Produces:

std\regex.d(6447): Error: found '..' when expecting ';' following statement
std\regex.d(6447): Error: found ']' when expecting ';' following statement
std\regex.d(6447): Error: dotvar has no effect in expression
((*__withSym).matches[cast(uint)1].begin)
std\regex.d(6447): Error: dotvar has no effect in expression
((*__withSym).matches[cast(uint)1].end)
std\regex.d(6448): Error: undefined identifier referenced
std\regex.d(6448): Error: undefined identifier referenced
std\regex.d(6451): Error: undefined identifier referenced
std\regex.d(6453): Error: undefined identifier referenced
Failed: "dmd" "-v" "-o-" "test_reg.d" "-I."

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 11 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10802


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #1 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-08-11
14:06:06 PDT ---
Fixed:
https://github.com/D-Programming-Language/phobos/pull/1465

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