| 1 |
/* REQUIRED_ARGS: -betterC |
| 2 |
PERMUTE_ARGS: |
| 3 |
*/ |
| 4 |
|
| 5 |
import core.stdc.stdio; |
| 6 |
|
| 7 |
extern (C) int main() |
| 8 |
{ |
| 9 |
printf("hello world\n"); |
| 10 |
int[3] a; |
| 11 |
foo(a[], 3); |
| 12 |
return 0; |
| 13 |
} |
| 14 |
|
| 15 |
int foo(int[] a, int i) |
| 16 |
{ |
| 17 |
return a[i]; |
| 18 |
} |
| 19 |
|
| 20 |
/**********************************************/ |
| 21 |
// https://issues.dlang.org/show_bug.cgi?id=19234 |
| 22 |
void issue19234() |
| 23 |
{ |
| 24 |
static struct A {} |
| 25 |
A[10] a; |
| 26 |
A[10] b; |
| 27 |
b[] = a[]; |
| 28 |
} |
| 29 |
|
| 30 |
/**********************************************/ |
| 31 |
// https://issues.dlang.org/show_bug.cgi?id=22922 |
| 32 |
void issue22922() |
| 33 |
{ |
| 34 |
int[] x = []; |
| 35 |
} |