]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/fail14249.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail14249.d
CommitLineData
b4c522fa
IB
1/*
2REQUIRED_ARGS: -unittest
3TEST_OUTPUT:
4---
5fee5ec3
IB
5fail_compilation/fail14249.d(21): Error: `shared static` constructor can only be member of module/aggregate/template, not function `main`
6fail_compilation/fail14249.d(22): Error: `shared static` destructor can only be member of module/aggregate/template, not function `main`
7fail_compilation/fail14249.d(23): Error: `static` constructor can only be member of module/aggregate/template, not function `main`
8fail_compilation/fail14249.d(24): Error: `static` destructor can only be member of module/aggregate/template, not function `main`
9fail_compilation/fail14249.d(25): Error: `unittest` can only be a member of module/aggregate/template, not function `main`
10fail_compilation/fail14249.d(26): Error: `invariant` can only be a member of aggregate, not function `main`
11fail_compilation/fail14249.d(27): Error: alias this can only be a member of aggregate, not function `main`
12fail_compilation/fail14249.d(28): Error: constructor can only be a member of aggregate, not function `main`
13fail_compilation/fail14249.d(29): Error: destructor can only be a member of aggregate, not function `main`
14fail_compilation/fail14249.d(30): Error: postblit can only be a member of struct, not function `main`
15fail_compilation/fail14249.d(31): Error: anonymous union can only be a part of an aggregate, not function `main`
16fail_compilation/fail14249.d(35): Error: mixin `fail14249.main.Mix!()` error instantiating
b4c522fa
IB
17---
18*/
19mixin template Mix()
20{
21 shared static this() {}
22 shared static ~this() {}
23 static this() {} // from fail197.d, 1510 ICE: Assertion failure: 'ad' on line 925 in file 'func.c'
24 static ~this() {}
25 unittest {}
26 invariant {}
27 alias a this;
b4c522fa
IB
28 this() {} // from fail268.d
29 ~this() {} // from fail268.d
30 this(this) {}
31 union { int x; double y; }
32}
33void main()
34{
35 mixin Mix!();
36}