blob: 44cd65ae8aa55d1c4dac5744ef0cc5f126802c07 [file] [log] [blame]
/*
TEST_OUTPUT:
---
fail_compilation/diag11727.d(10): Error: type `n` is not an expression
---
*/
auto returnEnum()
{
enum n;
return n;
}
void main()
{
assert(returnEnum() == 0);
}
/*
TEST_OUTPUT:
---
fail_compilation/diag11727.d(26): Error: type `void` is not an expression
---
*/
auto returnVoid()
{
alias v = void;
return v;
}
/*
TEST_OUTPUT:
---
fail_compilation/diag11727.d(38): Error: template `t()` has no type
---
*/
auto returnTemplate()
{
template t() {}
return t;
}