mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Allow FlexibleArray with union array data
This commit is contained in:
parent
8aef7275d0
commit
cc3fe5e40c
2 changed files with 58 additions and 9 deletions
|
@ -11777,6 +11777,14 @@ BfIRValue BfModule::ConstantToCurrent(BfConstant* constant, BfIRConstHolder* con
|
|||
newVals.Add(ConstantToCurrent(constHolder->GetConstant(val), constHolder, elementType));
|
||||
}
|
||||
}
|
||||
else if (wantType->IsInstanceOf(mCompiler->mSpanTypeDef))
|
||||
{
|
||||
auto elementType = wantType->GetUnderlyingType();
|
||||
for (auto val : constArray->mValues)
|
||||
{
|
||||
newVals.Add(ConstantToCurrent(constHolder->GetConstant(val), constHolder, elementType));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto wantTypeInst = wantType->ToTypeInstance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue