D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18837 - MMFile should have opDollar
Summary: MMFile should have opDollar
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: bootcamp, pull
Depends on:
Blocks:
 
Reported: 2018-05-07 02:53 UTC by leprecorny
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description leprecorny 2018-05-07 02:53:36 UTC
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 basile-z 2018-05-26 03:16:43 UTC
Pull : https://github.com/dlang/phobos/pull/6521
Comment 2 github-bugzilla 2018-05-29 11:25:00 UTC
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 <n8sh@users.noreply.github.com>