[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 at puremagic.com
d-bugmail at puremagic.com
Wed Oct 16 18:13:10 PDT 2013
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 at puremagic.com
ReportedBy: growlercab at gmail.com
--- Comment #0 from growlercab at gmail.com 2013-10-16 18:13:09 PDT ---
---
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: -------
More information about the Digitalmars-d-bugs
mailing list