repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Allow coarrays in select type. [PR46371, PR56496]
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail21928b.d
blob
3ce93e0a097b88547223210843eae9312f6b379f
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail21928b.d(18): Error: array literal in `@nogc` function `D main` may cause a GC allocation
5
---
6
*/
7
8
@nogc
:
9
10
11
struct
Shape
12
{
13
immutable
size_t
[]
dims
= [];
14
}
15
16
void
main
()
17
{
18
auto
s
=
Shape
(
Shape
.
init
.
dims
~
2
);
19
}