mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed comptime reflected static field accesses
This commit is contained in:
parent
4176f7369d
commit
a356186514
7 changed files with 177 additions and 16 deletions
|
@ -327,6 +327,14 @@ namespace System.Reflection
|
|||
if (!mFieldData.mFlags.HasFlag(FieldFlags.Static))
|
||||
return .Err(.InvalidTargetType);
|
||||
|
||||
if (Compiler.IsComptime)
|
||||
{
|
||||
void* dataPtr = Type.[Friend]Comptime_Field_GetStatic((int32)mTypeInstance.TypeId, (int32)mFieldData.mData);
|
||||
if (dataPtr != null)
|
||||
value = *(TMember*)dataPtr;
|
||||
return .Ok;
|
||||
}
|
||||
|
||||
targetDataAddr = null;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue