Bug 18837 – MMFile should have opDollar

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-07T02:53:36Z
Last change time
2020-03-21T03:56:39Z
Keywords
bootcamp, pull
Assigned to
No Owner
Creator
leprecorny

Comments

Comment #0 by leprecorny — 2018-05-07T02:53:36Z
std.mmfile.MmFile does not contain opDollar, so when trying to access the .length property, you get an error. E.g: import std.stdio, std.mmfile; void main() { MmFile shar = new MmFile(null, MmFile.Mode.readWrite, 10, null, 0); string output = shar[0 .. $]; } Would error due to "undefined identifier __dollar"
Comment #1 by b2.temp — 2018-05-26T03:16:43Z
Comment #2 by github-bugzilla — 2018-05-29T11:25:00Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/ba8134876b17550933e7212c526fa517eb8233fd [trivial] fix issue 18837 - MMFile should have opDollar https://github.com/dlang/phobos/commit/0df8d334a538e499ee30fbb57e7a0c46f3e1b0f2 Merge pull request #6521 from BBasile/issue-18837 [trivial] fix issue 18837 - MMFile should have opDollar merged-on-behalf-of: Nathan Sashihara <[email protected]>