We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1390a3c commit 8498f4dCopy full SHA for 8498f4d
2 files changed
compiler/test/fail_compilation/fail20547.d
compiler/test/fail_compilation/newaa.d
@@ -0,0 +1,19 @@
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
+}
0 commit comments