1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 12:02:21 +02:00

Fixed reflection issue

This commit is contained in:
Brian Fiete 2020-07-06 16:12:48 -07:00
parent 2226e51977
commit 6e6487d951
4 changed files with 26 additions and 10 deletions

View file

@ -5829,7 +5829,11 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
{
auto refVal = ReferenceStaticField(fieldInstance);
if (refVal.IsAddr())
constValue = mBfIRBuilder->CreatePtrToInt(refVal.mValue, BfTypeCode_Int64);
{
constValue = mBfIRBuilder->CreatePtrToInt(refVal.mValue, BfTypeCode_IntPtr);
if (mSystem->mPtrSize != 8)
constValue = mBfIRBuilder->CreateNumericCast(constValue, false, BfTypeCode_Int64);
}
}
if (!constValue)