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:
parent
2226e51977
commit
6e6487d951
4 changed files with 26 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue