| 1 |
struct S(int var = 3) { |
| 2 |
int a; |
| 3 |
} |
| 4 |
S s; |
| 5 |
|
| 6 |
alias A() = int; |
| 7 |
A a; |
| 8 |
|
| 9 |
enum e() = 5; |
| 10 |
e val; |
| 11 |
|
| 12 |
interface I() |
| 13 |
{ |
| 14 |
} |
| 15 |
I i; |
| 16 |
|
| 17 |
template t() |
| 18 |
{ |
| 19 |
} |
| 20 |
t tv; |
| 21 |
|
| 22 |
/* |
| 23 |
TEST_OUTPUT: |
| 24 |
--- |
| 25 |
fail_compilation/notype.d(4): Error: template struct `notype.S(int var = 3)` is used as a type without instantiation; to instantiate it use `S!(arguments)` |
| 26 |
fail_compilation/notype.d(7): Error: template `notype.A()` is used as a type |
| 27 |
fail_compilation/notype.d(10): Error: template `notype.e()` is used as a type |
| 28 |
fail_compilation/notype.d(15): Error: template interface `notype.I()` is used as a type without instantiation; to instantiate it use `I!(arguments)` |
| 29 |
fail_compilation/notype.d(20): Error: template `notype.t()` is used as a type |
| 30 |
--- |
| 31 |
*/ |