1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed issue with ref to an opaque type

This commit is contained in:
Brian Fiete 2021-12-14 12:35:42 -05:00
parent fd098f3e96
commit c59fac571a

View file

@ -16478,7 +16478,7 @@ void BfModule::SetupIRMethod(BfMethodInstance* methodInstance, BfIRFunction func
auto elementType = refType->mElementType; auto elementType = refType->mElementType;
PopulateType(elementType, BfPopulateType_Data); PopulateType(elementType, BfPopulateType_Data);
addDeref = elementType->mSize; addDeref = elementType->mSize;
if ((addDeref <= 0) && (!elementType->IsValuelessType())) if ((addDeref <= 0) && (!elementType->IsValuelessType()) && (!elementType->IsOpaque()))
AssertErrorState(); AssertErrorState();
} }
if ((resolvedTypeRef->IsComposite()) && (!resolvedTypeRef->IsTypedPrimitive())) if ((resolvedTypeRef->IsComposite()) && (!resolvedTypeRef->IsTypedPrimitive()))