d: Merge upstream dmd, druntime 26f049fb26, phobos 330d6a4fd.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / ice13874.d
blob9c13328982afe16aab98bf44c2a2f2bbc334c7e3
1 // REQUIRED_ARGS: -o-
2 // PERMUTE_ARGS:
4 template FunctionTypeOf(func...)
5 if (func.length == 1)
7 static if (is(typeof(& func[0]) Fsym : Fsym*) && is(Fsym == function) || is(typeof(& func[0]) Fsym == delegate))
9 alias Fsym FunctionTypeOf;
11 else static if (is(typeof(& func[0].opCall) Fobj == delegate))
13 alias Fobj FunctionTypeOf;
15 else
16 static assert(0);
19 enum DummyEnum;
20 static assert(!is(FunctionTypeOf!DummyEnum));