]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test6534.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test6534.d
1 void main()
2 {
3 class MC{ int x; }
4 const class CC{ int x; } static assert(is(typeof( CC.x) == const));
5 immutable class IC{ int x; } static assert(is(typeof( IC.x) == immutable));
6 shared class SC{ int x; } static assert(is(typeof( SC.x) == shared));
7 shared const class SCC{ int x; } static assert(is(typeof(SCC.x) == shared) && is(typeof(SCC.x) == const));
8
9 struct MS{ int x; }
10 const struct CS{ int x; } static assert(is(typeof( CS.x) == const));
11 immutable struct IS{ int x; } static assert(is(typeof( IS.x) == immutable));
12 shared struct SS{ int x; } static assert(is(typeof( SS.x) == shared));
13 shared const struct SCS{ int x; } static assert(is(typeof(SCS.x) == shared) && is(typeof(SCS.x) == const));
14
15 union MU{ int x; }
16 const union CU{ int x; } static assert(is(typeof( CU.x) == const));
17 immutable union IU{ int x; } static assert(is(typeof( IU.x) == immutable));
18 shared union SU{ int x; } static assert(is(typeof( SU.x) == shared));
19 shared const union SCU{ int x; } static assert(is(typeof(SCU.x) == shared) && is(typeof(SCU.x) == const));
20
21
22 static class S_MC{ int x; }
23 const static class S_CC{ int x; } static assert(is(typeof( S_CC.x) == const));
24 immutable static class S_IC{ int x; } static assert(is(typeof( S_IC.x) == immutable));
25 shared static class S_SC{ int x; } static assert(is(typeof( S_SC.x) == shared));
26 shared const static class S_SCC{ int x; } static assert(is(typeof(S_SCC.x) == shared) && is(typeof(S_SCC.x) == const));
27
28 static struct S_MS{ int x; }
29 const static struct S_CS{ int x; } static assert(is(typeof( S_CS.x) == const));
30 immutable static struct S_IS{ int x; } static assert(is(typeof( S_IS.x) == immutable));
31 shared static struct S_SS{ int x; } static assert(is(typeof( S_SS.x) == shared));
32 shared const static struct S_SCS{ int x; } static assert(is(typeof(S_SCS.x) == shared) && is(typeof(S_SCS.x) == const));
33
34 static union S_MU{ int x; }
35 const static union S_CU{ int x; } static assert(is(typeof( S_CU.x) == const));
36 immutable static union S_IU{ int x; } static assert(is(typeof( S_IU.x) == immutable));
37 shared static union S_SU{ int x; } static assert(is(typeof( S_SU.x) == shared));
38 shared const static union S_SCU{ int x; } static assert(is(typeof(S_SCU.x) == shared) && is(typeof(S_SCU.x) == const));
39 }