4 abstract class AbstractC
{}
5 static assert(!__traits(compiles
, { new AbstractC(); }));
8 static assert(!__traits(compiles
, { class D
: FinalC
{} }));
11 static assert(!__traits(compiles
, { auto sc
= new ScopeC(); }));
12 static assert( __traits(compiles
, { scope sc
= new ScopeC(); }));
14 synchronized class SyncC
{ void f(){} }
15 static assert(SyncC
.f
.mangleof
[$-13..$] == "5SyncC1fMOFZv");
17 @safe class SCx
{ void f(){} }
18 @trusted class SCy
{ void f(){} }
19 @system class SCz
{ void f(){} }
21 static assert(SCx
.f
.mangleof
[$-12..$] == "3SCx1fMFNfZv"); // Nf: FuncAttrSafe
22 static assert(SCy
.f
.mangleof
[$-12..$] == "3SCy1fMFNeZv"); // Ne: FuncAttrTrusted
23 static assert(SCz
.f
.mangleof
[$-10..$] == "3SCz1fMFZv"); // (none)