Bug 17458 – [std.regex] Assertion failure in package.d

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-06-01T12:24:46Z
Last change time
2018-01-05T13:30:37Z
Assigned to
Dmitry Olshansky
Creator
JR

Comments

Comment #0 by zorael — 2017-06-01T12:24:46Z
import std.stdio; import std.regex; void main() { enum pattern = r"^[a-zA-Z0-9_\\\[\]{}\^`-]+$"; auto engine = regex(pattern); auto matches = "å".matchAll(engine); writeln(matches.hit); }
Comment #1 by dmitry.olsh — 2017-07-26T08:37:29Z
Not a bug - there is no match, before calling matches.hit one must check it for !matches.empty.
Comment #2 by dlang-bugzilla — 2017-07-26T08:40:26Z
The error message needs to be improved, then. "Assertion failure" is devoid of any information. See also: https://github.com/dlang/phobos/pull/5578
Comment #3 by dmitry.olsh — 2017-07-26T08:48:26Z
Comment #4 by github-bugzilla — 2017-07-26T09:31:10Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7a51c0e24eea6c02336d2aa897c608974ea2ac57 Fix issue 17458 add messages to asserts https://github.com/dlang/phobos/commit/008a8a3ef3fab4e1f51f2bf65d3f6b42dc152f78 Merge pull request #5660 from DmitryOlshansky/issue-17458 [std.regex] Fix issue 17458 - add messages to asserts merged-on-behalf-of: Stefan Koch <[email protected]>
Comment #5 by github-bugzilla — 2017-08-16T13:24:17Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7a51c0e24eea6c02336d2aa897c608974ea2ac57 Fix issue 17458 add messages to asserts https://github.com/dlang/phobos/commit/008a8a3ef3fab4e1f51f2bf65d3f6b42dc152f78 Merge pull request #5660 from DmitryOlshansky/issue-17458
Comment #6 by github-bugzilla — 2018-01-05T13:30:37Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/7a51c0e24eea6c02336d2aa897c608974ea2ac57 Fix issue 17458 add messages to asserts https://github.com/dlang/phobos/commit/008a8a3ef3fab4e1f51f2bf65d3f6b42dc152f78 Merge pull request #5660 from DmitryOlshansky/issue-17458