Fix issue 18124 -- RegexMatch.front isn't clear as to what it returns#5976
Fix issue 18124 -- RegexMatch.front isn't clear as to what it returns#5976dlang-bot merged 1 commit intodlang:masterfrom
Conversation
inout as well). Fixes issue 18124
|
Thanks for your pull request, @schveiguy! Bugzilla references
|
|
I'm not sure this is a good idea. It binds us to an explicit return type that we may not be able to change in the future, e.g., if for example a future implementation wants to return distinct types for |
That ship has sailed, the return type is not a voldemort type, so code may already exists that uses the real type name. It's what I would do if I were stuffing the result into a struct. |
|
In fact, the docs of |
quickfur
left a comment
There was a problem hiding this comment.
Fair enough, let's just go with this then.
JackStouffer
left a comment
There was a problem hiding this comment.
@schveiguy Please see #5963
I think it's better to just update the docs
|
Wait, I apologize. I didn't see your other comments before I submitted the review. |
Easiest thing to do was explicitly type the result. It's probably less effort than documenting what it returns in ddoc, and is clearer to the user.
In all other cases in this file, the auto returns have explicit docs as to the return type. This really was the only anomaly.