mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Move dmd files into compiler/
This commit is contained in:
parent
20bd0cacbd
commit
6374bb87b7
4579 changed files with 4 additions and 4 deletions
30
compiler/test/fail_compilation/fail_arrayexp.d
Normal file
30
compiler/test/fail_compilation/fail_arrayexp.d
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/fail_arrayexp.d(24): Error: cannot use `[]` operator on expression of type `int`
|
||||
fail_compilation/fail_arrayexp.d(25): Error: cannot use `[]` operator on expression of type `void`
|
||||
fail_compilation/fail_arrayexp.d(26): Error: static array of `const(int)[]` with multiple lengths not allowed
|
||||
fail_compilation/fail_arrayexp.d(27): Error: only one index allowed to index `string`
|
||||
fail_compilation/fail_arrayexp.d(28): Error: no `[]` operator overload for type `U`
|
||||
fail_compilation/fail_arrayexp.d(29): Error: only one index allowed to index `(int, string)`
|
||||
---
|
||||
*/
|
||||
|
||||
int i;
|
||||
string str;
|
||||
union U {}
|
||||
alias typeAlias = const(int)[];
|
||||
void getVoid();
|
||||
alias getTuple(T...) = T;
|
||||
|
||||
void test19534() // https://issues.dlang.org/show_bug.cgi?id=19534
|
||||
{
|
||||
U agg;
|
||||
#line 24
|
||||
auto p = i[0];
|
||||
auto q = getVoid()[0];
|
||||
alias r = getTuple!(typeAlias[0, 1]);
|
||||
auto s = str[0, 1, 2];
|
||||
auto t = agg[];
|
||||
auto u = getTuple!(int, string)[1, 2];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue