Skip to content

Commit 58e4db9

Browse files
committed
fix Issue 22399 - importC: Error: static variable cannot be read at compile time
1 parent 9642b54 commit 58e4db9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/compilable/testcstuff2.c

+16
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,22 @@ static const S22375 s22375[10] =
458458
{32, 258, 258, 4096}
459459
};
460460

461+
/***************************************************/
462+
// https://issues.dlang.org/show_bug.cgi?id=22399
463+
464+
struct S22399a
465+
{
466+
unsigned short f1;
467+
};
468+
469+
struct S22399b
470+
{
471+
const struct S22399a *f1;
472+
};
473+
474+
const struct S22399a C22399[1] = { {12} };
475+
const struct S22399b C22399b = {C22399};
476+
461477
/***************************************************/
462478
// https://issues.dlang.org/show_bug.cgi?id=22400
463479

0 commit comments

Comments
 (0)