dmd/compiler/test/fail_compilation/fnconstraint.d

26 lines
673 B
D

/*
TEST_OUTPUT:
---
fail_compilation/fnconstraint.d(14): Error: template constraint must follow parameter lists and attributes
fail_compilation/fnconstraint.d(15): Error: declaration expected, not `{`
fail_compilation/fnconstraint.d(23): Error: template constraint must follow parameter lists and attributes
fail_compilation/fnconstraint.d(23): Error: declaration expected, not `{`
fail_compilation/fnconstraint.d(27): Error: `}` expected following members in `struct` declaration
fail_compilation/fnconstraint.d(19): struct `S` starts here
---
*/
void foo()()
in(true)
if (true)
{}
alias f = foo!();
struct S
{
this()()
if (true)
if (true) {}
}
S s;