d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / test7172.d
blob49142d7898850f4db7d173143c3159cc0504b34e
2 void main()
4 abstract class AbstractC{}
5 static assert(!__traits(compiles, { new AbstractC(); }));
7 final class FinalC{}
8 static assert(!__traits(compiles, { class D : FinalC{} }));
10 scope class ScopeC{}
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)