mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
35 lines
545 B
D
35 lines
545 B
D
/* REQUIRED_ARGS: -betterC
|
|
PERMUTE_ARGS:
|
|
*/
|
|
|
|
import core.stdc.stdio;
|
|
|
|
extern (C) int main()
|
|
{
|
|
printf("hello world\n");
|
|
int[3] a;
|
|
foo(a[], 3);
|
|
return 0;
|
|
}
|
|
|
|
int foo(int[] a, int i)
|
|
{
|
|
return a[i];
|
|
}
|
|
|
|
/**********************************************/
|
|
// https://issues.dlang.org/show_bug.cgi?id=19234
|
|
void issue19234()
|
|
{
|
|
static struct A {}
|
|
A[10] a;
|
|
A[10] b;
|
|
b[] = a[];
|
|
}
|
|
|
|
/**********************************************/
|
|
// https://issues.dlang.org/show_bug.cgi?id=22922
|
|
void issue22922()
|
|
{
|
|
int[] x = [];
|
|
}
|