Sign in
gnu
/
gcc
/
refs/tags/basepoints/gcc-13
/
.
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail21928b.d
blob: 3ce93e0a097b88547223210843eae9312f6b379f [
file
] [
log
] [
blame
]
/*
TEST_OUTPUT:
---
fail_compilation/fail21928b.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation
---
*/
@nogc
:
struct
Shape
{
immutable
size_t
[]
dims
=
[];
}
void
main
()
{
auto
s
=
Shape
(
Shape
.
init
.
dims
~
2
);
}