D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10913 - [2.064 git-head] regex/demange compilation failure
Summary: [2.064 git-head] regex/demange compilation failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2013-08-27 13:05 UTC by Nick Sabalausky
Modified: 2015-06-09 01:31 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Sabalausky 2013-08-27 13:05:29 UTC
The following worked in v2.063.2, but not in the latest github masters (This is preventing the "ddemangle" tool from compiling in the latest github master):

-------------------------------------------
import core.demangle;
import std.regex;
void main()
{
    replace!((a) => demangle(a.hit))("blah", regex(`a`));
}
-------------------------------------------

Result with github master:

-------------------------------------------
../dmd/src/../../phobos/std/regex.d(6078): Error: template D main.__lambda2 does not match any function template declaration. Candidates are:
test.d(5):        test.main.__lambda2(__T1)(a)
../dmd/src/../../phobos/std/regex.d(6078): Error: template test.main.__lambda2(__T1)(a) cannot deduce template function from argument types !()(Captures!(string, uint), Appender!string)
../dmd/src/../../phobos/std/regex.d(6106): Error: template instance test.main.replaceMatchesInto!(__lambda2, Appender!string, string, RegexMatch!(string, ThompsonMatcher)) error instantiating
../dmd/src/../../phobos/std/regex.d(6399):        instantiated from here: replaceAllWith!(__lambda2, match, string, Regex!char)
test.d(5):        instantiated from here: replace!(__lambda2, string, Regex!char)
../dmd/src/../../phobos/std/regex.d(6399): Error: template instance test.main.replaceAllWith!(__lambda2, match, string, Regex!char) error instantiating
test.d(5):        instantiated from here: replace!(__lambda2, string, Regex!char)
test.d(5): Error: template instance test.main.replace!(__lambda2, string, Regex!char) error instantiating
-------------------------------------------
Comment 1 hsteoh 2013-08-27 15:15:43 UTC

*** This issue has been marked as a duplicate of issue 10896 ***
Comment 2 Dmitry Olshansky 2013-08-28 02:22:21 UTC
It's about replace function in std.regex not just ddemangle failing to compile.
Comment 3 hsteoh 2013-08-28 20:32:17 UTC
This bug is not in DMD, it's a backward incompatibility caused by the latest changes to std.regex.
Comment 5 github-bugzilla 2013-09-08 08:39:14 UTC
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/99f466fee09a8fe41d04c785f5d7942e65f5b326
fix issue 10913 @safety of std.regex replace API

https://github.com/D-Programming-Language/phobos/commit/8e6bf693ac57c38e4fc6b8af8ca28e7ff7fbfb4f
Merge pull request #1532 from blackwhale/fix-replace-check

Fix issue 10913 std.regex API regression