mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Fixes https://github.com/dlang/dmd/issues/21210
This commit is contained in:
parent
ce6cef9762
commit
d66ef6a26d
2 changed files with 31 additions and 2 deletions
|
@ -761,9 +761,13 @@ Initializer initializerSemantic(Initializer init, Scope* sc, ref Type tx, NeedIn
|
|||
// C11 6.2.5-20 "element type shall be complete whenever the array type is specified"
|
||||
assert(0); // should have been detected by parser
|
||||
}
|
||||
auto bt = tsa.nextOf().toBasetype();
|
||||
|
||||
auto tnsa = tsa.nextOf().toBasetype().isTypeSArray();
|
||||
|
||||
if (auto tnss = bt.isTypeStruct())
|
||||
{
|
||||
return subStruct(tnss, index);
|
||||
}
|
||||
auto tnsa = bt.isTypeSArray();
|
||||
auto ai = new ArrayInitializer(ci.loc);
|
||||
ai.isCarray = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue