digitalmars.D.bugs - [Issue 11285] New: [REG2.064 beta 1] std.regex.replace with CTRE error: no return exp; or assert(0); at end of function
- d-bugmail puremagic.com (48/48) Oct 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11285
- d-bugmail puremagic.com (12/12) Oct 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11285
http://d.puremagic.com/issues/show_bug.cgi?id=11285 Summary: [REG2.064 beta 1] std.regex.replace with CTRE error: no return exp; or assert(0); at end of function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: growlercab gmail.com --- import std.regex:ctRegex, replace; void main() { enum ctre = ctRegex!(".*why not"); string msg = "blah blah why not use a regex?"; msg = replace(msg, ctre, "why"); } --- $ dmd test.d dmd2/import/std/regex.d(6107): Error: template std.regex.replaceMatchesInto does not match any function template declaration. Candidates are: dmd2/import/std/regex.d(6067): std.regex.replaceMatchesInto(alias output, Sink, R, T)(ref Sink sink, R input, T matches) if (isOutputRange!(Sink, dchar) && isSomeString!R && is(T == RegexMatch!R)) dmd2/import/std/regex.d(6107): Error: template std.regex.replaceMatchesInto(alias output, Sink, R, T)(ref Sink sink, R input, T matches) if (isOutputRange!(Sink, dchar) && isSomeString!R && is(T == RegexMatch!R)) cannot deduce template function from argument types !(__lambda4)(Appender!string, string, RegexMatch!(string, BacktrackingMatcher)) dmd2/import/std/regex.d(6099): Error: function std.regex.replace!(match, string, char, StaticRegex!char).replace.replaceAllWith!((m, sink) => replaceFmt(format, m, sink), match, string, StaticRegex!char).replaceAllWith no return exp; or assert(0); at end of function dmd2/import/std/regex.d(6393): Error: template instance std.regex.replace!(match, string, char, StaticRegex!char).replace.replaceAllWith!((m, sink) => replaceFmt(format, m, sink), match, string, StaticRegex!char) error instantiating test.d(5): instantiated from here: replace!(match, string, char, StaticRegex!char) test.d(5): Error: template instance std.regex.replace!(match, string, char, StaticRegex!char) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 16 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11285 Dmitry Olshansky <dmitry.olsh gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |dmitry.olsh gmail.com Resolution| |DUPLICATE 02:00:41 PDT --- *** This issue has been marked as a duplicate of issue 11262 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 17 2013