Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: michelf/phobos
base: master
...
head fork: michelf/phobos
compare: @property
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 27 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 07, 2011
@michelf Begun support for @property 8b817a8
View
212 std/algorithm.d
@@ -229,9 +229,9 @@ unittest
assert(squares2.back == 16);
assert(squares2.front == 1);
- squares2.popFront;
+ squares2.popFront();
assert(squares2.front == 4);
- squares2.popBack;
+ squares2.popBack();
assert(squares2.front == 4);
assert(squares2.back == 9);
@@ -264,10 +264,10 @@ unittest
// stuff is disabled.
auto fibsSquares = map!"a * a"(recurrence!("a[n-1] + a[n-2]")(1, 1));
assert(fibsSquares.front == 1);
- fibsSquares.popFront;
- fibsSquares.popFront;
+ fibsSquares.popFront();
+ fibsSquares.popFront();
assert(fibsSquares.front == 4);
- fibsSquares.popFront;
+ fibsSquares.popFront();
assert(fibsSquares.front == 9);
auto repeatMap = map!"a"(repeat(1));
@@ -372,7 +372,7 @@ template reduce(fun...)
alias args[0] seed;
alias args[1] r;
Unqual!(Args[0]) result = seed;
- for (; !r.empty; r.popFront)
+ for (; !r.empty; r.popFront())
{
static if (fun.length == 1)
{
@@ -581,7 +581,7 @@ if (isForwardRange!Range && is(typeof(range.front = filler)))
alias ElementType!Range T;
static if (hasElaborateCopyConstructor!T || !isDynamicArray!Range)
{
- for (; !range.empty; range.popFront)
+ for (; !range.empty; range.popFront())
{
range.front = filler;
}
@@ -645,7 +645,7 @@ if (isForwardRange!Range1 && isForwardRange!Range2
{
enforce(!filler.empty);
auto t = filler.save;
- for (; !range.empty; range.popFront, t.popFront)
+ for (; !range.empty; range.popFront, t.popFront())
{
if (t.empty) t = filler;
range.front = t.front;
@@ -683,7 +683,7 @@ if (isForwardRange!Range && is(typeof(range.front = filler)))
static if (hasElaborateCopyConstructor!T)
{
// Must construct stuff by the book
- for (; !range.empty; range.popFront)
+ for (; !range.empty; range.popFront())
{
emplace!T((cast(void*) &range.front)[0 .. T.sizeof], filler);
}
@@ -739,7 +739,7 @@ if (isForwardRange!Range && is(typeof(range.front = range.front)))
static if (is(typeof(&(range.front()))))
{
// Range exposes references
- for (; !range.empty; range.popFront)
+ for (; !range.empty; range.popFront())
{
memcpy(&(range.front()), &T.init, T.sizeof);
}
@@ -747,7 +747,7 @@ if (isForwardRange!Range && is(typeof(range.front = range.front)))
else
{
// Go the slow route
- for (; !range.empty; range.popFront)
+ for (; !range.empty; range.popFront())
{
range.front = filler;
}
@@ -820,7 +820,7 @@ struct Filter(alias pred, Range) if (isInputRange!(Unqual!Range))
this(R r)
{
_input = r;
- while (!_input.empty && !pred(_input.front)) _input.popFront;
+ while (!_input.empty && !pred(_input.front)) _input.popFront();
}
ref Filter opSlice()
@@ -841,7 +841,7 @@ struct Filter(alias pred, Range) if (isInputRange!(Unqual!Range))
{
do
{
- _input.popFront;
+ _input.popFront();
} while (!_input.empty && !pred(_input.front));
}
@@ -994,7 +994,7 @@ struct FilterBidirectional(alias pred, Range) if (isBidirectionalRange!(Unqual!R
{
do
{
- _input.popFront;
+ _input.popFront();
} while (!_input.empty && !pred(_input.front));
}
@@ -1007,7 +1007,7 @@ struct FilterBidirectional(alias pred, Range) if (isBidirectionalRange!(Unqual!R
{
do
{
- _input.popBack;
+ _input.popBack();
} while (!_input.empty && !pred(_input.back));
}
@@ -1123,7 +1123,7 @@ $(D walkLength(src) >= walkLength(tgt))
*/
Range2 moveAll(Range1, Range2)(Range1 src, Range2 tgt)
{
- for (; !src.empty; src.popFront, tgt.popFront)
+ for (; !src.empty; src.popFront, tgt.popFront())
{
enforce(!tgt.empty);
move(src.front, tgt.front);
@@ -1151,7 +1151,7 @@ leftover portions of the two ranges.
*/
Tuple!(Range1, Range2) moveSome(Range1, Range2)(Range1 src, Range2 tgt)
{
- for (; !src.empty && !tgt.empty; src.popFront, tgt.popFront)
+ for (; !src.empty && !tgt.empty; src.popFront, tgt.popFront())
{
enforce(!tgt.empty);
move(src.front, tgt.front);
@@ -1539,7 +1539,7 @@ private:
static if (isBidirectionalRange!Range)
size_t _backLength = size_t.max;
- size_t separatorLength() { return _separator.length; }
+ @property size_t separatorLength() { return _separator.length; }
void ensureFrontLength()
{
@@ -1593,7 +1593,7 @@ public:
void popFront()
{
assert(!empty);
- ensureFrontLength;
+ ensureFrontLength();
if (_frontLength == _input.length)
{
// done, there's no separator in sight
@@ -1635,13 +1635,13 @@ public:
{
@property Range back()
{
- ensureBackLength;
+ ensureBackLength();
return _input[_input.length - _backLength .. _input.length];
}
void popBack()
{
- ensureBackLength;
+ ensureBackLength();
if (_backLength == _input.length)
{
// done
@@ -2115,7 +2115,7 @@ struct Uniq(alias pred, R)
auto last = _input.front;
do
{
- _input.popFront;
+ _input.popFront();
}
while (!_input.empty && binaryFun!(pred)(last, _input.front));
}
@@ -2129,7 +2129,7 @@ struct Uniq(alias pred, R)
auto last = _input.back;
do
{
- _input.popBack;
+ _input.popBack();
}
while (!_input.empty && binaryFun!(pred)(last, _input.back));
}
@@ -2211,7 +2211,7 @@ struct Group(alias pred, R) if (isInputRange!R)
this(R input)
{
_input = input;
- if (!_input.empty) popFront;
+ if (!_input.empty) popFront();
}
void popFront()
@@ -2223,11 +2223,11 @@ struct Group(alias pred, R) if (isInputRange!R)
else
{
_current = tuple(_input.front, 1u);
- _input.popFront;
+ _input.popFront();
while (!_input.empty && comp(_current[0], _input.front))
{
++_current[1];
- _input.popFront;
+ _input.popFront();
}
}
}
@@ -2316,12 +2316,12 @@ assert(r == [ 1, 2, 3, 4, 5 ]);
// //auto target = begin(r), e = end(r);
// auto target = r;
// auto source = r;
-// source.popFront;
+// source.popFront();
// while (!source.empty)
// {
// if (!pred(target.front, source.front))
// {
-// target.popFront;
+// target.popFront();
// continue;
// }
// // found an equal *source and *target
@@ -2330,9 +2330,9 @@ assert(r == [ 1, 2, 3, 4, 5 ]);
// //@@@
// //move(source.front, target.front);
// target[0] = source[0];
-// source.popFront;
+// source.popFront();
// if (source.empty) break;
-// if (!pred(target.front, source.front)) target.popFront;
+// if (!pred(target.front, source.front)) target.popFront();
// }
// break;
// }
@@ -2724,7 +2724,7 @@ Tuple!(Range, size_t) find(alias pred = "a == b", Range, Ranges...)
(Range haystack, Ranges needles)
if (Ranges.length > 1 && allSatisfy!(isForwardRange, Ranges))
{
- for (;; haystack.popFront)
+ for (;; haystack.popFront())
{
size_t r = startsWith!pred(haystack, needles);
if (r || haystack.empty)
@@ -2933,7 +2933,7 @@ unittest
}
/**
-Advances the input range $(D haystack) by calling $(D haystack.popFront)
+Advances the input range $(D haystack) by calling $(D haystack.popFront())
until either $(D pred(haystack.front)), or $(D
haystack.empty). Performs $(BIGOH haystack.length) evaluations of $(D
pred). See also $(WEB sgi.com/tech/stl/find_if.html, STL's find_if).
@@ -2955,7 +2955,7 @@ assert(find!(pred)(arr) == arr);
Range find(alias pred, Range)(Range haystack) if (isInputRange!(Range))
{
alias unaryFun!(pred) predFun;
- for (; !haystack.empty && !predFun(haystack.front); haystack.popFront)
+ for (; !haystack.empty && !predFun(haystack.front); haystack.popFront())
{
}
return haystack;
@@ -3234,7 +3234,7 @@ unittest
If $(D haystack) supports slicing, returns the smallest number $(D n)
such that $(D haystack[n .. $].startsWith!pred(needle)). Oherwise,
returns the smallest $(D n) such that after $(D n) calls to $(D
-haystack.popFront), $(D haystack.startsWith!pred(needle)). If no such
+haystack.popFront()), $(D haystack.startsWith!pred(needle)). If no such
number could be found, return $(D -1).
*/
sizediff_t countUntil(alias pred = "a == b", R1, R2)(R1 haystack, R2 needle)
@@ -3244,7 +3244,7 @@ if (is(typeof(startsWith!pred(haystack, needle))))
{
// Narrow strings are handled a bit differently
auto length = haystack.length;
- for (; !haystack.empty; haystack.popFront)
+ for (; !haystack.empty; haystack.popFront())
{
if (startsWith!pred(haystack, needle))
{
@@ -3356,13 +3356,13 @@ struct Until(alias pred, Range, Sentinel) if (isInputRange!Range)
_done = true;
return;
}
- _input.popFront;
+ _input.popFront();
_done = _input.empty;
}
else
{
- _input.popFront;
- _done = _input.empty || predSatisfied;
+ _input.popFront();
+ _done = _input.empty || predSatisfied();
}
}
@@ -3717,7 +3717,7 @@ if (isInputRange!(Range) && Ranges.length > 0
if (rhs[i].empty) return i + 1;
}
bool mismatch[Ranges.length];
- for (; !lhs.empty; lhs.popBack)
+ for (; !lhs.empty; lhs.popBack())
{
foreach (i, Unused; Ranges)
{
@@ -3814,7 +3814,7 @@ Range findAdjacent(alias pred = "a == b", Range)(Range r)
auto ahead = r;
if (!ahead.empty)
{
- for (ahead.popFront; !ahead.empty; r.popFront, ahead.popFront)
+ for (ahead.popFront(); !ahead.empty; r.popFront(), ahead.popFront())
{
if (binaryFun!(pred)(r.front, ahead.front)) return r;
}
@@ -3844,7 +3844,7 @@ unittest
// findAmong
/**
-Advances $(D seq) by calling $(D seq.popFront) until either $(D
+Advances $(D seq) by calling $(D seq.popFront()) until either $(D
find!(pred)(choices, seq.front)) is $(D true), or $(D seq) becomes
empty. Performs $(BIGOH seq.length * choices.length) evaluations of
$(D pred). See also $(WEB sgi.com/tech/stl/find_first_of.html, STL's
@@ -3861,7 +3861,7 @@ Range1 findAmong(alias pred = "a == b", Range1, Range2)(
Range1 seq, Range2 choices)
if (isInputRange!Range1 && isForwardRange!Range2)
{
- for (; !seq.empty && find!pred(choices, seq.front).empty; seq.popFront)
+ for (; !seq.empty && find!pred(choices, seq.front).empty; seq.popFront())
{
}
return seq;
@@ -4065,7 +4065,7 @@ if (isInputRange!(Range1) && isInputRange!(Range2)
{
if (r2.empty) return false;
if (!binaryFun!(pred)(e1, r2.front)) return false;
- r2.popFront;
+ r2.popFront();
}
return r2.empty;
}
@@ -4364,7 +4364,7 @@ minCount(alias pred = "a < b", Range)(Range range)
if (range.empty) return typeof(return)();
auto p = &(range.front());
size_t occurrences = 1;
- for (range.popFront; !range.empty; range.popFront)
+ for (range.popFront(); !range.empty; range.popFront())
{
if (binaryFun!(pred)(*p, range.front)) continue;
if (binaryFun!(pred)(range.front, *p))
@@ -4414,7 +4414,7 @@ Range minPos(alias pred = "a < b", Range)(Range range)
{
if (range.empty) return range;
auto result = range;
- for (range.popFront; !range.empty; range.popFront)
+ for (range.popFront(); !range.empty; range.popFront())
{
if (binaryFun!(pred)(result.front, range.front)
|| !binaryFun!(pred)(range.front, result.front)) continue;
@@ -4680,7 +4680,7 @@ levenshteinDistanceAndPath(alias equals = "a == b", Range1, Range2)
{
Levenshtein!(Range1, binaryFun!(equals)) lev;
auto d = lev.distance(s, t);
- return tuple(d, lev.path);
+ return tuple(d, lev.path());
}
unittest
@@ -4797,7 +4797,7 @@ swapRanges(Range1, Range2)(Range1 r1, Range2 r2)
&& hasSwappableElements!(Range1) && hasSwappableElements!(Range2)
&& is(ElementType!(Range1) == ElementType!(Range2)))
{
- for (; !r1.empty && !r2.empty; r1.popFront, r2.popFront)
+ for (; !r1.empty && !r2.empty; r1.popFront, r2.popFront())
{
swap(r1.front, r2.front);
}
@@ -4834,9 +4834,9 @@ if (isBidirectionalRange!(Range) && hasSwappableElements!(Range))
while (!r.empty)
{
swap(r.front, r.back);
- r.popFront;
+ r.popFront();
if (r.empty) break;
- r.popBack;
+ r.popBack();
}
}
@@ -5182,7 +5182,7 @@ moves is performed.) $(LI Otherwise, if $(D s ==
SwapStrategy.unstable && isBidirectionalRange!Range &&
hasLength!Range), then elements are still moved from the end of the
range, but time is spent on advancing between slots by repeated calls
-to $(D range.popFront).) $(LI Otherwise, elements are moved incrementally
+to $(D range.popFront()).) $(LI Otherwise, elements are moved incrementally
towards the front of $(D range); a given element is never moved
several times, but more elements are moved than in the previous
cases.))
@@ -5242,8 +5242,8 @@ if (isBidirectionalRange!Range && hasLength!Range && s != SwapStrategy.stable
foreach (i; 0 .. rid)
{
move(range.back, t.front);
- range.popBack;
- t.popFront;
+ range.popBack();
+ t.popFront();
}
if (rEnd - rStart == lEnd - lStart)
{
@@ -5315,14 +5315,14 @@ if ((isForwardRange!Range && !isBidirectionalRange!Range
enum delta = 1;
}
assert(pos <= from);
- for (; pos < from; ++pos, src.popFront, tgt.popFront)
+ for (; pos < from; ++pos, src.popFront, tgt.popFront())
{
move(src.front, tgt.front);
}
// now skip source to the "to" position
src.popFrontN(delta);
pos += delta;
- foreach (j; 0 .. delta) result.popBack;
+ foreach (j; 0 .. delta) result.popBack();
}
// leftover move
moveAll(src, tgt);
@@ -5391,28 +5391,28 @@ if (isBidirectionalRange!Range)
{
if (!unaryFun!(pred)(range.front))
{
- range.popFront;
+ range.popFront();
continue;
}
move(range.back, range.front);
- range.popBack;
- result.popBack;
+ range.popBack();
+ result.popBack();
}
}
else
{
auto tgt = range;
- for (; !range.empty; range.popFront)
+ for (; !range.empty; range.popFront())
{
if (unaryFun!(pred)(range.front))
{
// yank this guy
- result.popBack;
+ result.popBack();
continue;
}
// keep this guy
move(range.front, tgt.front);
- tgt.popFront;
+ tgt.popFront();
}
}
return result;
@@ -5571,7 +5571,7 @@ Range partition(alias predicate,
{
if (r.length == 1)
{
- if (pred(r.front)) r.popFront;
+ if (pred(r.front)) r.popFront();
return r;
}
const middle = r.length / 2;
@@ -5583,17 +5583,17 @@ Range partition(alias predicate,
}
else static if (ss == SwapStrategy.semistable)
{
- for (; !r.empty; r.popFront)
+ for (; !r.empty; r.popFront())
{
// skip the initial portion of "correct" elements
if (pred(r.front)) continue;
// hit the first "bad" element
auto result = r;
- for (r.popFront; !r.empty; r.popFront)
+ for (r.popFront(); !r.empty; r.popFront())
{
if (!pred(r.front)) continue;
swap(result.front, r.front);
- result.popFront;
+ result.popFront();
}
return result;
}
@@ -5610,15 +5610,15 @@ Range partition(alias predicate,
{
if (r.empty) return result;
if (!pred(r.front)) break;
- r.popFront;
- result.popFront;
+ r.popFront();
+ result.popFront();
}
// found the left bound
assert(!r.empty);
for (;;)
{
if (pred(r.back)) break;
- r.popBack;
+ r.popBack();
if (r.empty) return result;
}
// found the right bound, swap & make progress
@@ -5632,9 +5632,9 @@ Range partition(alias predicate,
r.front = t2;
r.back = t1;
}
- r.popFront;
- result.popFront;
- r.popBack;
+ r.popFront();
+ result.popFront();
+ r.popBack();
}
}
}
@@ -5675,7 +5675,7 @@ unittest // partition
auto a = rndstuff!(int)();
partition!(even)(a);
assert(isPartitioned!(even)(a));
- auto b = rndstuff!(string);
+ auto b = rndstuff!(string)();
partition!(`a.length < 5`)(b);
assert(isPartitioned!(`a.length < 5`)(b));
}
@@ -5693,10 +5693,10 @@ assert(isPartitioned!("a & 1")(r));
bool isPartitioned(alias pred, Range)(Range r)
if (isForwardRange!(Range))
{
- for (; !r.empty; r.popFront)
+ for (; !r.empty; r.popFront())
{
if (unaryFun!(pred)(r.front)) continue;
- for (r.popFront; !r.empty; r.popFront)
+ for (r.popFront(); !r.empty; r.popFront())
{
if (unaryFun!(pred)(r.front)) return false;
}
@@ -5860,7 +5860,7 @@ void topN(alias less = "a < b",
static assert(ss == SwapStrategy.unstable,
"Stable topN not yet implemented");
auto heap = BinaryHeap!Range1(r1);
- for (; !r2.empty; r2.popFront)
+ for (; !r2.empty; r2.popFront())
{
heap.conditionalInsert(r2.front);
}
@@ -5965,10 +5965,10 @@ unittest
//sort!("b - a")(a);
//assert(isSorted!(less)(a));
- a = rndstuff!(int);
+ a = rndstuff!(int)();
sort(a);
assert(isSorted(a));
- auto b = rndstuff!(string);
+ auto b = rndstuff!(string)();
sort!("tolower(a) < tolower(b)")(b);
assert(isSorted!("toupper(a) < toupper(b)")(b));
}
@@ -6083,12 +6083,12 @@ void sortImpl(alias less, SwapStrategy ss, Range)(Range r)
{
// worst case: *b <= everything (also pivot <= everything)
// avoid quadratic behavior
- do r.popFront; while (!r.empty && !less(right.front, r.front));
+ do r.popFront(); while (!r.empty && !less(right.front, r.front));
}
else
{
auto left = r[0 .. r.length - right.length];
- right.popFront; // no need to consider right.front,
+ right.popFront(); // no need to consider right.front,
// it's in the proper place already
if (right.length > left.length)
{
@@ -6735,7 +6735,7 @@ unittest
}
// random data
- auto b = rndstuff!(string);
+ auto b = rndstuff!(string)();
auto index = new string*[b.length];
partialIndex!("toupper(a) < toupper(b)")(b, index);
assert(isSorted!("toupper(*a) < toupper(*b)")(index));
@@ -6814,7 +6814,7 @@ unittest
// && *index[2] == "c" && *index[3] == "C");
// // random data
-// auto b = rndstuff!(string);
+// auto b = rndstuff!(string)();
// auto index1 = schwartzMakeIndex!(toupper)(b);
// assert(isSorted!("toupper(*a) < toupper(*b)")(index1));
// }
@@ -6836,7 +6836,7 @@ unittest
{
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
- auto a = rndstuff!(int);
+ auto a = rndstuff!(int)();
if (a.length)
{
auto b = a[a.length / 2];
@@ -7025,7 +7025,7 @@ public:
if (i < _crt) continue;
// found _crt
assert(!_r[i].empty);
- _r[i].popFront;
+ _r[i].popFront();
adjustPosition();
return;
}
@@ -7127,11 +7127,11 @@ private:
{
if (comp(_input[0].front, _input[1].front))
{
- _input[0].popFront;
+ _input[0].popFront();
}
else if (comp(_input[1].front, _input[0].front))
{
- _input[1].popFront;
+ _input[1].popFront();
}
else
{
@@ -7145,7 +7145,7 @@ public:
{
this._input = input;
// position to the first element
- adjustPosition;
+ adjustPosition();
}
@property bool empty()
@@ -7162,9 +7162,9 @@ public:
assert(!empty);
assert(!comp(_input[0].front, _input[1].front)
&& !comp(_input[1].front, _input[0].front));
- _input[0].popFront;
- _input[1].popFront;
- adjustPosition;
+ _input[0].popFront();
+ _input[1].popFront();
+ adjustPosition();
}
@property ElementType front()
@@ -7244,13 +7244,13 @@ private:
if (r2.empty || comp(r1.front, r2.front)) break;
if (comp(r2.front, r1.front))
{
- r2.popFront;
+ r2.popFront();
}
else
{
// both are equal
- r1.popFront;
- r2.popFront;
+ r1.popFront();
+ r2.popFront();
}
}
}
@@ -7261,13 +7261,13 @@ public:
this.r1 = r1;
this.r2 = r2;
// position to the first element
- adjustPosition;
+ adjustPosition();
}
void popFront()
{
- r1.popFront;
- adjustPosition;
+ r1.popFront();
+ adjustPosition();
}
@property ElementType!(R1) front()
@@ -7287,7 +7287,7 @@ public:
}
}
- bool empty() { return r1.empty; }
+ @property bool empty() { return r1.empty; }
}
/// Ditto
@@ -7340,8 +7340,8 @@ private:
break;
}
// equal, pop both
- r1.popFront;
- r2.popFront;
+ r1.popFront();
+ r2.popFront();
}
}
@@ -7351,28 +7351,28 @@ public:
this.r1 = r1;
this.r2 = r2;
// position to the first element
- adjustPosition;
+ adjustPosition();
}
void popFront()
{
assert(!empty);
- if (r1.empty) r2.popFront;
- else if (r2.empty) r1.popFront;
+ if (r1.empty) r2.popFront();
+ else if (r2.empty) r1.popFront();
else
{
// neither is empty
if (comp(r1.front, r2.front))
{
- r1.popFront;
+ r1.popFront();
}
else
{
assert(comp(r2.front, r1.front));
- r2.popFront;
+ r2.popFront();
}
}
- adjustPosition;
+ adjustPosition();
}
@property ElementType!(R1) front()
@@ -7485,7 +7485,7 @@ version(unittest)
Computes the union of multiple sets. The input sets are passed as a
range of ranges and each is assumed to be sorted by $(D
less). Computation is done lazily, one union element at a time. The
-complexity of one $(D popFront) operation is $(BIGOH
+complexity of one $(D popFront()) operation is $(BIGOH
log(ror.length)). However, the length of $(D ror) decreases as ranges
in it are exhausted, so the complexity of a full pass through $(D
NWayUnion) is dependent on the distribution of the lengths of ranges
@@ -7551,10 +7551,10 @@ struct NWayUnion(alias less, RangeOfRanges)
{
_heap.removeFront();
// let's look at the guy just popped
- _ror.back.popFront;
+ _ror.back.popFront();
if (_ror.back.empty)
{
- _ror.popBack;
+ _ror.popBack();
// nothing else to do: the empty range is not in the
// heap and not in _ror
return;
View
14 std/array.d
@@ -361,14 +361,14 @@ int[] a = [ 1, 2, 3 ];
assert(a.front == 1);
----
*/
-ref T front(T)(T[] a)
+@property ref T front(T)(T[] a)
if (!isNarrowString!(T[]) && !is(T[] == void[]))
{
assert(a.length, "Attempting to fetch the front of an empty array");
return a[0];
}
-dchar front(A)(A a) if (isNarrowString!A)
+@property dchar front(A)(A a) if (isNarrowString!A)
{
assert(a.length, "Attempting to fetch the front of an empty array");
size_t i = 0;
@@ -780,7 +780,7 @@ if (isInputRange!RoR && isInputRange!(ElementType!RoR) && isForwardRange!R)
}
else
{
- return copy(iter, appender!(typeof(return))).data;
+ return copy(iter, appender!(typeof(return))()).data;
}
}
@@ -798,7 +798,7 @@ if (isInputRange!RoR && isInputRange!(ElementType!RoR))
}
else
{
- return copy(iter, appender!(typeof(return))).data;
+ return copy(iter, appender!(typeof(return))()).data;
}
}
@@ -1417,14 +1417,14 @@ struct SimpleSlice(T)
/**
Range primitives.
*/
- bool empty() const
+ @property bool empty() const
{
assert(_b <= _e);
return _b == _e;
}
/// Ditto
- ref T front()
+ @property ref T front()
{
assert(!empty);
return *_b;
@@ -1438,7 +1438,7 @@ struct SimpleSlice(T)
}
/// Ditto
- ref T back()
+ @property ref T back()
{
assert(!empty);
return _e[-1];
View
4 std/base64.d
@@ -1518,7 +1518,7 @@ unittest
auto f = File("testingEncoder");
scope(exit)
{
- f.close;
+ f.close();
assert(!f.isOpen);
std.file.remove("testingEncoder");
}
@@ -1537,7 +1537,7 @@ unittest
auto f = File("testingDecoder");
scope(exit)
{
- f.close;
+ f.close();
assert(!f.isOpen);
std.file.remove("testingDecoder");
}
View
38 std/bitmanip.d
@@ -77,17 +77,17 @@ private template createAccessors(
static assert(len == 1);
enum result =
// getter
- "bool " ~ name ~ "() const { return "
+ "bool " ~ name ~ "() const @property { return "
~"("~store~" & "~myToString(maskAllElse)~") != 0;}\n"
// setter
- ~"void " ~ name ~ "(bool v){"
+ ~"void " ~ name ~ "(bool v) @property {"
~"if (v) "~store~" |= "~myToString(maskAllElse)~";"
~"else "~store~" &= ~"~myToString(maskAllElse)~";}\n";
}
else
{
// getter
- enum result = T.stringof~" "~name~"() const { auto result = "
+ enum result = T.stringof~" "~name~"() const @property { auto result = "
"("~store~" & "
~ myToString(maskAllElse) ~ ") >>"
~ myToString(offset) ~ ";"
@@ -97,7 +97,7 @@ private template createAccessors(
: "")
~ " return cast("~T.stringof~") result;}\n"
// setter
- ~"void "~name~"("~T.stringof~" v){ "
+ ~"void "~name~"("~T.stringof~" v) @property { "
~"assert(v >= "~name~"_min); "
~"assert(v <= "~name~"_max); "
~store~" = cast(typeof("~store~"))"
@@ -309,7 +309,7 @@ else version(X86_64)
else
static assert(false, "unknown platform");
- const size_t dim()
+ @property const size_t dim()
{
return (len + (bitsPerSizeT-1)) / bitsPerSizeT;
}
@@ -325,7 +325,7 @@ else
{
if (newlen != len)
{
- size_t olddim = dim();
+ size_t olddim = dim;
size_t newdim = (newlen + (bitsPerSizeT-1)) / bitsPerSizeT;
if (newdim != olddim)
@@ -390,7 +390,7 @@ else
/**********************************************
* Support for array.dup property for BitArray.
*/
- BitArray dup()
+ @property BitArray dup()
{
BitArray ba;
@@ -519,7 +519,7 @@ else
int i;
b.init(data);
- b.reverse;
+ b.reverse();
for (i = 0; i < data.length; i++)
{
assert(b[i] == data[4 - i]);
@@ -582,7 +582,7 @@ else
__gshared size_t x = 0b1100011000;
__gshared BitArray ba = { 10, &x };
- ba.sort;
+ ba.sort();
for (size_t i = 0; i < 6; i++)
assert(ba[i] == false);
for (size_t i = 6; i < 10; i++)
@@ -777,7 +777,7 @@ else
*/
BitArray opCom()
{
- auto dim = this.dim();
+ auto dim = this.dim;
BitArray result;
@@ -816,7 +816,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
BitArray result;
@@ -856,7 +856,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
BitArray result;
@@ -896,7 +896,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
BitArray result;
@@ -938,7 +938,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
BitArray result;
@@ -978,7 +978,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
for (size_t i = 0; i < dim; i++)
ptr[i] &= e2.ptr[i];
@@ -1014,7 +1014,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
for (size_t i = 0; i < dim; i++)
ptr[i] |= e2.ptr[i];
@@ -1049,7 +1049,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
for (size_t i = 0; i < dim; i++)
ptr[i] ^= e2.ptr[i];
@@ -1086,7 +1086,7 @@ else
}
body
{
- auto dim = this.dim();
+ auto dim = this.dim;
for (size_t i = 0; i < dim; i++)
ptr[i] &= ~e2.ptr[i];
@@ -1184,7 +1184,7 @@ else
{
BitArray r;
- r = this.dup;
+ r = this.dup();
r.length = len + 1;
r[len] = b;
return r;
View
16 std/concurrency.d
@@ -91,9 +91,9 @@ private
{
static if( T.length == 1 )
return is( T[0] == Variant ) ||
- data.convertsTo!(T);
+ data.convertsTo!(T)();
else
- return data.convertsTo!(Tuple!(T));
+ return data.convertsTo!(Tuple!(T))();
}
auto get(T...)()
@@ -103,11 +103,11 @@ private
static if( is( T[0] == Variant ) )
return data;
else
- return data.get!(T);
+ return data.get!(T)();
}
else
{
- return data.get!(Tuple!(T));
+ return data.get!(Tuple!(T))();
}
}
@@ -749,7 +749,7 @@ private
alias ParameterTypeTuple!(t) Args;
auto op = ops[i];
- if( msg.convertsTo!(Args) )
+ if( msg.convertsTo!(Args)() )
{
static if( is( ReturnType!(t) == bool ) )
{
@@ -926,8 +926,8 @@ private
{
void onLinkDeadMsg( ref Message msg )
{
- assert( msg.convertsTo!(Tid) );
- auto tid = msg.get!(Tid);
+ assert( msg.convertsTo!(Tid)() );
+ auto tid = msg.get!(Tid)();
links.remove( tid );
if( tid == owner )
@@ -1162,7 +1162,7 @@ private
/*
*
*/
- bool empty()
+ @property bool empty()
{
return m_first is null;
}
View
10 std/container.d
@@ -942,7 +942,7 @@ Defines the container's primary range, which embodies a forward range.
private Node * _head;
private this(Node * p) { _head = p; }
/// Forward range primitives.
- bool empty() const { return !_head; }
+ @property bool empty() const { return !_head; }
/// ditto
@property Range save() { return this; }
/// ditto
@@ -2492,7 +2492,7 @@ the heap work incorrectly.
this.percolateDown(_store, i, _length);
if (i-- == 0) break;
}
- assertValid;
+ assertValid();
}
/**
@@ -2504,7 +2504,7 @@ heap.
_payload.RefCounted.ensureInitialized();
_store() = s;
_length() = min(_store.length, initialSize);
- assertValid;
+ assertValid();
}
/**
@@ -2667,7 +2667,7 @@ Replaces the largest element in the store with $(D value).
assert(!empty);
_store.front = value;
percolateDown(_store, 0, _length);
- assertValid;
+ assertValid();
}
/**
@@ -2691,7 +2691,7 @@ must be collected.
if (!comp(value, _store.front)) return false; // value >= largest
_store.front = value;
percolateDown(_store, 0, _length);
- assertValid;
+ assertValid();
return true;
}
}
View
16 std/conv.d
@@ -292,14 +292,14 @@ if (isAssociativeArray!S && isSomeString!T)
}
/**
- Object to string conversion calls $(D toString) against the object or
+ Object to string conversion calls $(D toString()) against the object or
returns $(D nullstr) if the object is null.
*/
T toImpl(T, S)(S s, in T nullstr = "null")
if (is(S : Object) && isSomeString!T)
{
if (!s) return nullstr;
- return to!(T)(s.toString);
+ return to!(T)(s.toString());
}
unittest
@@ -313,13 +313,13 @@ unittest
}
/**
- Struct to string conversion calls $(D toString) against the struct if
+ Struct to string conversion calls $(D toString()) against the struct if
it is defined.
*/
T toImpl(T, S)(S s)
-if (is(S == struct) && isSomeString!T && is(typeof(&S.init.toString)))
+if (is(S == struct) && isSomeString!T && is(typeof(S.init.toString())))
{
- return to!T(s.toString);
+ return to!T(s.toString());
}
unittest
@@ -330,12 +330,12 @@ unittest
}
/**
- For structs that do not define $(D toString), the conversion to string
+ For structs that do not define $(D toString()), the conversion to string
produces the list of fields.
*/
T toImpl(T, S)(S s, in T left = S.stringof~"(", in T separator = ", ",
in T right = ")")
-if (is(S == struct) && isSomeString!T && !is(typeof(&S.init.toString)) &&
+if (is(S == struct) && isSomeString!T && !is(typeof(S.init.toString())) &&
!isInputRange!S)
{
Tuple!(FieldTypeTuple!(S)) * t = void;
@@ -3929,7 +3929,7 @@ template isOctalLiteral(string num) {
assert(a == 8);
*/
-T octal(T, string num)() {
+@property T octal(T, string num)() {
static assert(isOctalLiteral!num, num ~ " is not a valid octal literal");
ulong pow = 1;
View
4 std/cpuid.d
@@ -73,7 +73,8 @@ version(D_InlineAsm_X86)
"Multithreading: %d threads / %d cores\n", threadsPerCPU, coresPerCPU);
}
-
+ @property
+ {
/// Returns vendor string
string vendor() {return vendorStr.idup;} // todo: optimize
/// Returns processor string
@@ -123,6 +124,7 @@ version(D_InlineAsm_X86)
/// Returns family
uint family() {return _family;}
//uint processorType() {return (signature>>>12)&0x3;}
+ }
shared static this()
{
View
2  std/datebase.d
@@ -21,5 +21,5 @@ extern(C) void std_date_static_this();
shared static this()
{
- std_date_static_this;
+ std_date_static_this();
}
View
64 std/encoding.d
@@ -369,14 +369,14 @@ template EncoderFunctions()
template ReadFromString()
{
- bool canRead() { return s.length != 0; }
+ @property bool canRead() { return s.length != 0; }
E peek() { return s[0]; }
E read() { E t = s[0]; s = s[1..$]; return t; }
}
template ReverseReadFromString()
{
- bool canRead() { return s.length != 0; }
+ @property bool canRead() { return s.length != 0; }
E peek() { return s[$-1]; }
E read() { E t = s[$-1]; s = s[0..$-1]; return t; }
}
@@ -709,18 +709,18 @@ template EncoderInstance(CharType : AsciiChar)
dchar decodeViaRead()()
{
- return read;
+ return read();
}
dchar safeDecodeViaRead()()
{
- dchar c = read;
+ dchar c = read();
return canEncode(c) ? c : INVALID_SEQUENCE;
}
dchar decodeReverseViaRead()()
{
- return read;
+ return read();
}
EString replacementSequence()
@@ -786,17 +786,17 @@ template EncoderInstance(CharType : Latin1Char)
dchar decodeViaRead()()
{
- return read;
+ return read();
}
dchar safeDecodeViaRead()()
{
- return read;
+ return read();
}
dchar decodeReverseViaRead()()
{
- return read;
+ return read();
}
EString replacementSequence()
@@ -887,20 +887,20 @@ template EncoderInstance(CharType : Windows1252Char)
dchar decodeViaRead()()
{
- Windows1252Char c = read;
+ Windows1252Char c = read();
return (c >= 0x80 && c < 0xA0) ? charMap[c-0x80] : c;
}
dchar safeDecodeViaRead()()
{
- Windows1252Char c = read;
+ Windows1252Char c = read();
dchar d = (c >= 0x80 && c < 0xA0) ? charMap[c-0x80] : c;
return d == 0xFFFD ? INVALID_SEQUENCE : d;
}
dchar decodeReverseViaRead()()
{
- Windows1252Char c = read;
+ Windows1252Char c = read();
return (c >= 0x80 && c < 0xA0) ? charMap[c-0x80] : c;
}
@@ -999,7 +999,7 @@ template EncoderInstance(CharType : char)
void skipViaRead()()
{
- auto c = read;
+ auto c = read();
if (c < 0xC0) return;
int n = tails(cast(char) c);
for (size_t i=0; i<n; ++i)
@@ -1010,26 +1010,26 @@ template EncoderInstance(CharType : char)
dchar decodeViaRead()()
{
- dchar c = read;
+ dchar c = read();
if (c < 0xC0) return c;
int n = tails(cast(char) c);
c &= (1 << (6 - n)) - 1;
for (size_t i=0; i<n; ++i)
{
- c = (c << 6) + (read & 0x3F);
+ c = (c << 6) + (read() & 0x3F);
}
return c;
}
dchar safeDecodeViaRead()()
{
- dchar c = read;
+ dchar c = read();
if (c < 0x80) return c;
int n = tails(cast(char) c);
if (n == 0) return INVALID_SEQUENCE;
if (!canRead) return INVALID_SEQUENCE;
- size_t d = peek;
+ size_t d = peek();
bool err =
(
(c < 0xC2) // fail overlong 2-byte sequences
@@ -1044,9 +1044,9 @@ template EncoderInstance(CharType : char)
for (size_t i=0; i<n; ++i)
{
if (!canRead) return INVALID_SEQUENCE;
- d = peek;
+ d = peek();
if ((d & 0xC0) != 0x80) return INVALID_SEQUENCE;
- c = (c << 6) + (read & 0x3F);
+ c = (c << 6) + (read() & 0x3F);
}
return err ? INVALID_SEQUENCE : c;
@@ -1054,14 +1054,14 @@ template EncoderInstance(CharType : char)
dchar decodeReverseViaRead()()
{
- dchar c = read;
+ dchar c = read();
if (c < 0x80) return c;
size_t shift = 0;
c &= 0x3F;
for (size_t i=0; i<4; ++i)
{
shift += 6;
- auto d = read;
+ auto d = read();
size_t n = tails(cast(char) d);
size_t mask = n == 0 ? 0x3F : (1 << (6 - n)) - 1;
c += ((d & mask) << shift);
@@ -1128,16 +1128,16 @@ template EncoderInstance(CharType : wchar)
void skipViaRead()()
{
- wchar c = read;
+ wchar c = read();
if (c < 0xD800 || c >= 0xE000) return;
read();
}
dchar decodeViaRead()()
{
- wchar c = read;
+ wchar c = read();
if (c < 0xD800 || c >= 0xE000) return cast(dchar)c;
- wchar d = read;
+ wchar d = read();
c &= 0x3FF;
d &= 0x3FF;
return 0x10000 + (c << 10) + d;
@@ -1145,13 +1145,13 @@ template EncoderInstance(CharType : wchar)
dchar safeDecodeViaRead()()
{
- wchar c = read;
+ wchar c = read();
if (c < 0xD800 || c >= 0xE000) return cast(dchar)c;
if (c >= 0xDC00) return INVALID_SEQUENCE;
if (!canRead) return INVALID_SEQUENCE;
- wchar d = peek;
+ wchar d = peek();
if (d < 0xDC00 || d >= 0xE000) return INVALID_SEQUENCE;
- d = read;
+ d = read();
c &= 0x3FF;
d &= 0x3FF;
return 0x10000 + (c << 10) + d;
@@ -1159,9 +1159,9 @@ template EncoderInstance(CharType : wchar)
dchar decodeReverseViaRead()()
{
- wchar c = read;
+ wchar c = read();
if (c < 0xD800 || c >= 0xE000) return cast(dchar)c;
- wchar d = read;
+ wchar d = read();
c &= 0x3FF;
d &= 0x3FF;
return 0x10000 + (d << 10) + c;
@@ -1221,18 +1221,18 @@ template EncoderInstance(CharType : dchar)
dchar decodeViaRead()()
{
- return cast(dchar)read;
+ return cast(dchar)read();
}
dchar safeDecodeViaRead()()
{
- dchar c = read;
+ dchar c = read();
return isValidCodePoint(c) ? c : INVALID_SEQUENCE;
}
dchar decodeReverseViaRead()()
{
- return cast(dchar)read;
+ return cast(dchar)read();
}
EString replacementSequence()
@@ -2198,7 +2198,7 @@ abstract class EncodingScheme
* Normally this will be a representation of some substitution
* character, such as U+FFFD or '?'.
*/
- abstract immutable(ubyte)[] replacementSequence();
+ @property abstract immutable(ubyte)[] replacementSequence();
}
/**
View
2  std/exception.d
@@ -436,7 +436,7 @@ class ErrnoException : Exception
uint errno; // operating system error code
this(string msg, string file = null, uint line = 0)
{
- errno = getErrno;
+ errno = getErrno();
version (linux)
{
char[1024] buf = void;
View
2  std/file.d
@@ -236,7 +236,7 @@ class FileException : Exception
line = The line where the error occurred.
+/
version(Posix) this(in char[] name,
- uint errno = .getErrno,
+ uint errno = .getErrno(),
string file = __FILE__,
size_t line = __LINE__)
{
View
182 std/format.d
@@ -621,18 +621,18 @@ struct FormatSpec(Char)
assert(f.trailing == "ghi");
// test with embedded %%s
f = FormatSpec("ab%%cd%%ef%sg%%h%sij");
- w.clear;
+ w.clear();
f.writeUpToNextSpec(w);
assert(w.data == "ab%cd%ef" && f.trailing == "g%%h%sij", w.data);
f.writeUpToNextSpec(w);
assert(w.data == "ab%cd%efg%h" && f.trailing == "ij");
// bug4775
f = FormatSpec("%%%s");
- w.clear;
+ w.clear();
f.writeUpToNextSpec(w);
assert(w.data == "%" && f.trailing == "");
f = FormatSpec("%%%%%s%%");
- w.clear;
+ w.clear();
while (f.writeUpToNextSpec(w)) continue;
assert(w.data == "%%%");
}
@@ -1605,12 +1605,12 @@ unittest
int[] a = [ 1, 3, 2 ];
formattedWrite(w, "testing %(%s & %) embedded", a);
assert(w.data == "testing 1 & 3 & 2 embedded", w.data);
- w.clear;
+ w.clear();
formattedWrite(w, "testing %((%s) %)) wyda3", a);
assert(w.data == "testing (1) (3) (2) wyda3", w.data);
int[0] empt = [];
- w.clear;
+ w.clear();
formattedWrite(w, "(%s)", empt);
assert(w.data == "()", w.data);
}
@@ -1674,7 +1674,7 @@ unittest
formattedWrite(w, "%+r", a);
assert(w.data.length == 4 && w.data[0] == 2 && w.data[1] == 3
&& w.data[2] == 4 && w.data[3] == 5);
- w.clear;
+ w.clear();
formattedWrite(w, "%-r", a);
assert(w.data.length == 4 && w.data[0] == 5 && w.data[1] == 4
&& w.data[2] == 3 && w.data[3] == 2);
@@ -1689,10 +1689,10 @@ unittest
42, 0);
assert(w.data == "Numbers 0 and 42 are reversed and 420 repeated",
w.data);
- w.clear;
+ w.clear();
formattedWrite(w, "asd%s", 23);
assert(w.data == "asd23", w.data);
- w.clear;
+ w.clear();
formattedWrite(w, "%s%s", 23, 45);
assert(w.data == "2345", w.data);
}
@@ -1709,7 +1709,7 @@ unittest
assert(stream.data == "hello world! true 57 ",
stream.data);
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%g %A %s", 1.67, -1.28, float.nan);
// std.c.stdio.fwrite(stream.data.ptr, stream.data.length, 1, stderr);
@@ -1732,54 +1732,54 @@ unittest
assert(stream.data == "1.67 -0X1.47AE147AE147BP+0 nan",
stream.data);
}
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%x %X", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "1234af AFAFAFAF");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%b %o", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "100100011010010101111 25753727657");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%d %s", 0x1234AF, 0xAFAFAFAF);
assert(stream.data == "1193135 2947526575");
- stream.clear;
+ stream.clear();
// formattedWrite(stream, "%s", 1.2 + 3.4i);
// assert(stream.data == "1.2+3.4i");
- // stream.clear;
+ // stream.clear();
formattedWrite(stream, "%a %A", 1.32, 6.78f);
//formattedWrite(stream, "%x %X", 1.32);
assert(stream.data == "0x1.51eb851eb851fp+0 0X1.B1EB86P+2");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%#06.*f",2,12.345);
assert(stream.data == "012.35");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%#0*.*f",6,2,12.345);
assert(stream.data == "012.35");
- stream.clear;
+ stream.clear();
const real constreal = 1;
formattedWrite(stream, "%g",constreal);
assert(stream.data == "1");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%7.4g:", 12.678);
assert(stream.data == " 12.68:");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%7.4g:", 12.678L);
assert(stream.data == " 12.68:");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%04f|%05d|%#05x|%#5x",-4.,-10,1,1);
assert(stream.data == "-4.000000|-0010|0x001| 0x1",
stream.data);
- stream.clear;
+ stream.clear();
int i;
string s;
@@ -1787,46 +1787,46 @@ unittest
i = -10;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "-10|-10|-10|-10|-10.0000");
- stream.clear;
+ stream.clear();
i = -5;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "-5| -5|-05|-5|-5.0000");
- stream.clear;
+ stream.clear();
i = 0;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "0| 0|000|0|0.0000");
- stream.clear;
+ stream.clear();
i = 5;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "5| 5|005|5|5.0000");
- stream.clear;
+ stream.clear();
i = 10;
formattedWrite(stream, "%d|%3d|%03d|%1d|%01.4f",i,i,i,i,cast(double) i);
assert(stream.data == "10| 10|010|10|10.0000");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%.0d", 0);
assert(stream.data == "");
- stream.clear;
+ stream.clear();
formattedWrite(stream, "%.g", .34);
assert(stream.data == "0.3");
- stream.clear;
+ stream.clear();
- stream.clear; formattedWrite(stream, "%.0g", .34);
+ stream.clear(); formattedWrite(stream, "%.0g", .34);
assert(stream.data == "0.3");
- stream.clear; formattedWrite(stream, "%.2g", .34);
+ stream.clear(); formattedWrite(stream, "%.2g", .34);
assert(stream.data == "0.34");
- stream.clear; formattedWrite(stream, "%0.0008f", 1e-08);
+ stream.clear(); formattedWrite(stream, "%0.0008f", 1e-08);
assert(stream.data == "0.00000001");
- stream.clear; formattedWrite(stream, "%0.0008f", 1e-05);
+ stream.clear(); formattedWrite(stream, "%0.0008f", 1e-05);
assert(stream.data == "0.00001000");
//return;
@@ -1834,207 +1834,207 @@ unittest
s = "helloworld";
string r;
- stream.clear; formattedWrite(stream, "%.2s", s[0..5]);
+ stream.clear(); formattedWrite(stream, "%.2s", s[0..5]);
assert(stream.data == "he");
- stream.clear; formattedWrite(stream, "%.20s", s[0..5]);
+ stream.clear(); formattedWrite(stream, "%.20s", s[0..5]);
assert(stream.data == "hello");
- stream.clear; formattedWrite(stream, "%8s