Merge branch 'master' into utf8string

This commit is contained in:
Eugen Wissner 2017-04-16 20:52:40 +02:00
commit 9a4c8cea06
1 changed files with 17 additions and 0 deletions

View File

@ -495,3 +495,20 @@ private @nogc unittest
auto rc = defaultAllocator.refCounted!(int[])(5);
assert(rc.length == 5);
}
private @nogc unittest
{
static bool destroyed = false;
struct F
{
~this() @nogc
{
destroyed = true;
}
}
{
auto rc = defaultAllocator.refCounted!F();
}
assert(destroyed);
}