]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/templatethis.d
Merge remote-tracking branch 'origin/master' into devel/c++-contracts
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / templatethis.d
CommitLineData
7e7ebe3e
IB
1/*
2TEST_OUTPUT:
3---
4fail_compilation/templatethis.d(13): Error: cannot use `this` outside an aggregate type
5fail_compilation/templatethis.d(17): Error: cannot use `this` outside an aggregate type
6fail_compilation/templatethis.d(21): Error: cannot use `this` outside an aggregate type
7fail_compilation/templatethis.d(23): Error: cannot use `this` outside an aggregate type
8fail_compilation/templatethis.d(29): Error: cannot use `this` outside an aggregate type
9fail_compilation/templatethis.d(32): Error: mixin `templatethis.t2!()` error instantiating
10---
11*/
12
13template t(this T)
14{
15}
16
17struct S(this T)
18{
19}
20
21enum e(this T) = 1;
22
23void f(this T)()
24{
25}
26
27mixin template t2()
28{
29 int i(this T) = 1;
30}
31
32mixin t2;
33
34class C
35{
36 mixin t2; // OK
37}