Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions test/runnable/testaa.d
Original file line number Diff line number Diff line change
Expand Up @@ -1296,11 +1296,12 @@ void test14321()
{
struct Foo
{
static string op;
static char[8] buf;
static char[] op;

this(int id) { op ~= "c"; }
this(this) { op ~= "p"; }
~this() { op ~= "d"; }
this(int id) { buf[op.length] = 'c'; op = buf[0..op.length + 1]; }
this(this) { buf[op.length] = 'p'; op = buf[0..op.length + 1]; }
~this() { buf[op.length] = 'd'; op = buf[0..op.length + 1]; }
}
Foo[string] foos;
assert(Foo.op == "");
Expand All @@ -1311,12 +1312,13 @@ void test14321()

struct Bar
{
static string op;
static char[8] buf;
static char[] op;

int id;
//this(int id) { op ~= "c"; }
this(this) { op ~= "p"; }
~this() { op ~= "d"; }
this(this) { buf[op.length] = 'p'; op = buf[0..op.length + 1]; }
~this() { buf[op.length] = 'd'; op = buf[0..op.length + 1]; }
}
Bar[string] bars;
assert(Bar.op == "");
Expand Down