From fdc3e994cd901b5e34bf82dc6de214a77ab9dff8 Mon Sep 17 00:00:00 2001 From: Steven Schveighoffer Date: Sun, 31 Dec 2017 09:24:47 -0500 Subject: [PATCH] Explicitly type RegexMatch.front (and add inout because captures has inout as well). Fixes issue 18124 --- std/regex/package.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/std/regex/package.d b/std/regex/package.d index 4a6b1de67..e2565d4d9 100644 --- a/std/regex/package.d +++ b/std/regex/package.d @@ -764,7 +764,7 @@ public: assert(m.empty); --- +/ - @property auto front() + @property inout(Captures!R) front() inout { return _captures; } @@ -799,7 +799,7 @@ public: T opCast(T:bool)(){ return !empty; } /// Same as .front, provided for compatibility with original std.regex. - @property auto captures() inout { return _captures; } + @property inout(Captures!R) captures() inout { return _captures; } } private @trusted auto matchOnce(RegEx, R)(R input, const RegEx prog)