mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
23 lines
464 B
D
23 lines
464 B
D
// https://issues.dlang.org/show_bug.cgi?id=20938
|
|
// Cannot create const arrays mixing immutable and mutable structs with indirections
|
|
struct S { int[] a; }
|
|
enum A { a }
|
|
enum B { b }
|
|
|
|
void fun() {
|
|
int* pi;
|
|
immutable int* ipi;
|
|
int[] ai;
|
|
immutable int[] iai;
|
|
S s;
|
|
immutable S _is;
|
|
Object o;
|
|
immutable Object io;
|
|
|
|
auto a = [pi, ipi];
|
|
auto b = [ai, iai];
|
|
auto c = [s, _is];
|
|
auto d = [o, io];
|
|
|
|
auto e = [A.a, B.b];
|
|
}
|