mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled. std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid. std.xml: Element.text() cannot be a property due to the optional parameter.
This commit is contained in:
parent
0eddab60b9
commit
e312f9898b
33 changed files with 603 additions and 593 deletions
|
@ -1452,7 +1452,7 @@ auto pathSplitter(C)(const(C)[] path) @safe pure nothrow
|
|||
_path = rtrimDirSeparators(_path[0 .. i+1]);
|
||||
}
|
||||
}
|
||||
auto save() { return this; }
|
||||
@property auto save() { return this; }
|
||||
|
||||
|
||||
private:
|
||||
|
@ -1549,7 +1549,7 @@ unittest
|
|||
// save()
|
||||
auto ps1 = pathSplitter("foo/bar/baz");
|
||||
auto ps2 = ps1.save();
|
||||
ps1.popFront;
|
||||
ps1.popFront();
|
||||
assert (equal2(ps1, ["bar", "baz"]));
|
||||
assert (equal2(ps2, ["foo", "bar", "baz"]));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue