1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed deriving from "valueless" crepr struct

This commit is contained in:
Brian Fiete 2025-03-28 08:09:22 -04:00
parent fe1aa3c26e
commit eb41a9c1de
3 changed files with 29 additions and 1 deletions

View file

@ -4615,7 +4615,15 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
typeInstance->mInstSize = baseTypeInst->mInstSize;
typeInstance->mInstAlign = baseTypeInst->mInstAlign;
typeInstance->mAlign = baseTypeInst->mAlign;
typeInstance->mSize = baseTypeInst->mSize;
typeInstance->mSize = baseTypeInst->mSize;
if (baseTypeInst->IsValuelessCReprType())
{
typeInstance->mInstSize = 0;
if (typeInstance->IsValueType())
typeInstance->mSize = 0;
}
typeInstance->mHasPackingHoles = baseTypeInst->mHasPackingHoles;
if (baseTypeInst->mIsTypedPrimitive)
typeInstance->mIsTypedPrimitive = true;