]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/protection/basic/tests.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / protection / basic / tests.d
1 module protection.basic.tests;
2
3 import protection.basic.mod1;
4
5 static assert ( is(typeof(publicFoo())));
6 static assert ( is(typeof(packageFoo())));
7 static assert (!is(typeof(privateFoo())));
8
9 static assert ( is(typeof(Test.init.publicFoo())));
10 static assert (!is(typeof(Test.init.protectedFoo())));
11 static assert ( is(typeof(Test.init.packageFoo())));
12 static assert (!is(typeof(Test.init.privateFoo())));
13
14 class Deriv : Test
15 {
16 void stub()
17 {
18 static assert ( is(typeof(this.publicFoo())));
19 static assert ( is(typeof(this.protectedFoo())));
20 static assert ( is(typeof(this.packageFoo())));
21 static assert (!is(typeof(this.privateFoo())));
22 }
23 }