[Issue 7810] New: ctRegex!`a|b` asserts at regex.d:1150

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 2 06:12:14 PDT 2012


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

           Summary: ctRegex!`a|b` asserts at regex.d:1150
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: simendsjo at gmail.com


--- Comment #0 from simendsjo <simendsjo at gmail.com> 2012-04-02 06:12:47 PDT ---
Using dmd 2.059 trunk

import std.regex;
//enum re = ctRegex!`(^[a-z]+)|([A-Z0-9][a-z0-9]+)|([A-Z]+)|([a-z]+)`;
//enum re = ctRegex!`(a)|(b)`;
enum re = ctRegex!`a|b`;
void main() {}


/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(1150): Error:
assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(876):        called
from here: this.parseRegex()
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6428):       
called from here: parser.this(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6412):       
called from here: regexImpl(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6437):       
called from here: regex("a|b",[])
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(1150): Error:
assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(876):        called
from here: this.parseRegex()
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6428):       
called from here: parser.this(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6412):       
called from here: regexImpl(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6439):       
called from here: regex("a|b",[])
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6439):       
called from here: ctGenRegExCode(regex("a|b",[]))
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(1150): Error:
assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(876):        called
from here: this.parseRegex()
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6428):       
called from here: parser.this(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6412):       
called from here: regexImpl(pattern,flags)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6446):       
called from here: regex("a|b",[])
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6446):       
called from here:
StaticRegex(null,Regex(null,null,null,0u,0u,0u,0u,0u,null,null,ShiftOr(null,0u,0u))).this(regex("a|b",[]),&
func)
/home/simendsjo/code/dmd-trunk/build/src/phobos/std/regex.d(6463): Error:
template instance std.regex.ctRegexImpl!("a|b",[]) error instantiating
re.d(4):        instantiated from here: ctRegex!("a|b")
re.d(4): Error: template instance std.regex.ctRegex!("a|b") error instantiating

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


More information about the Digitalmars-d-bugs mailing list