summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2016-12-22 22:01:11 +0100
committerEugen Wissner <belka@caraus.de>2016-12-22 22:01:11 +0100
commitb41dcc9f370cd9c138e35ba844c7d9a318c17911 (patch)
tree7f45363eb014018ea637ffbaa142dd2b1063f3c3
parent38addb7a5b3f73119d907d0c3abe5b3ce56f7006 (diff)
downloadtanya-b41dcc9f370cd9c138e35ba844c7d9a318c17911.tar.gz
Fix compatibility issue with dmd 2.071
-rw-r--r--source/tanya/container/buffer.d9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/tanya/container/buffer.d b/source/tanya/container/buffer.d
index 6551b65..18501f0 100644
--- a/source/tanya/container/buffer.d
+++ b/source/tanya/container/buffer.d
@@ -524,8 +524,13 @@ struct WriteBuffer(T = ubyte)
assert(b.capacity == 8);
assert(b.buffer_[0] == 23 && b.buffer_[1] == 255
&& b.buffer_[2] == 48 && b.buffer_[3] == 23 && b.buffer_[4] == 255);
+ }
- b = WriteBuffer!ubyte(2);
+ ///
+ unittest
+ {
+ auto b = WriteBuffer!ubyte(2);
+ ubyte[3] buf = [48, 23, 255];
b ~= buf;
assert(b.start == 0);
@@ -688,5 +693,5 @@ struct WriteBuffer(T = ubyte)
private unittest
{
- static assert(is(WriteBuffer!int));
+ static assert(is(typeof(WriteBuffer!int(5))));
}