Debian Codegraph @

gcc/testsuite/gdc.test/compilable/ice13874.d

raw
1 // REQUIRED_ARGS: -o-
2 // PERMUTE_ARGS:
3
4 template FunctionTypeOf(func...)
5 if (func.length == 1)
6 {
7 static if (is(typeof(& func[0]) Fsym : Fsym*) && is(Fsym == function) || is(typeof(& func[0]) Fsym == delegate))
8 {
9 alias Fsym FunctionTypeOf;
10 }
11 else static if (is(typeof(& func[0].opCall) Fobj == delegate))
12 {
13 alias Fobj FunctionTypeOf;
14 }
15 else
16 static assert(0);
17 }
18
19 enum DummyEnum;
20 static assert(!is(FunctionTypeOf!DummyEnum));