Bug 16983 – std.range.takeNone examples does not compile
Status
RESOLVED
Resolution
INVALID
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-12-18T21:34:00Z
Last change time
2016-12-19T05:17:15Z
Assigned to
nobody
Creator
chalucha
Comments
Comment #0 by chalucha — 2016-12-18T21:34:39Z
auto range = takeNone!(int[])();
assert(range.length == 0);
assert(range.empty);
Does not compile with:
no property 'empty' for type 'int[]'
Tried with DMD v2.072.1
Comment #1 by b2.temp — 2016-12-19T05:17:15Z
You must import the module where the example stands and it works. This is true for any example in phobos, so here just add import `import std.range;`