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
d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
compilable
/
b20938.d
blob
efcf4aab06fbc05089bd2dc8b7e0092c11a720d0
1
// issue 20938 - Cannot create const arrays mixing immutable and mutable structs with indirections
2
struct
S
{
int
[]
a
; }
3
enum
A
{
a
}
4
enum
B
{
b
}
5
6
void
fun
() {
7
int
*
pi
;
8
immutable int
*
ipi
;
9
int
[]
ai
;
10
immutable int
[]
iai
;
11
S s
;
12
immutable
S _is
;
13
Object o
;
14
immutable
Object io
;
15
16
auto
a
= [
pi
,
ipi
];
17
auto
b
= [
ai
,
iai
];
18
auto
c
= [
s
,
_is
];
19
auto
d
= [
o
,
io
];
20
21
auto
e
= [
A
.
a
,
B
.
b
];
22
}