| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/newaa.d(14): Error: cannot implicitly convert expression `new string[string]` of type `string[string]` to `int[string]` |
| 5 |
fail_compilation/newaa.d(15): Error: function expected before `()`, not `new int[int]` of type `int[int]` |
| 6 |
fail_compilation/newaa.d(17): Error: `new` cannot take arguments for an associative array |
| 7 |
--- |
| 8 |
*/ |
| 9 |
#line 9 |
| 10 |
void main() |
| 11 |
{ |
| 12 |
//https://issues.dlang.org/show_bug.cgi?id=11790 |
| 13 |
string[string] crash = new string[string]; |
| 14 |
//https://issues.dlang.org/show_bug.cgi?id=20547 |
| 15 |
int[string] c = new typeof(crash); |
| 16 |
auto d = new int[int](5); |
| 17 |
alias AA = char[string]; |
| 18 |
auto e = new AA(5); |
| 19 |
} |