mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-30 05:15:59 +02:00
Reflection field value fixes and tests
This commit is contained in:
parent
d4c78c0799
commit
d864a912c5
3 changed files with 41 additions and 1 deletions
|
@ -150,7 +150,7 @@ namespace System.Reflection
|
|||
return &value;*/
|
||||
|
||||
if (type.IsBoxed)
|
||||
return ((uint8*)(void*)value) + type.[Friend]mMemberDataOffset;
|
||||
return ((uint8*)Internal.UnsafeCastToPtr(value)) + type.[Friend]mMemberDataOffset;
|
||||
return ((uint8*)Internal.UnsafeCastToPtr(value));
|
||||
}
|
||||
|
||||
|
|
|
@ -733,6 +733,12 @@ namespace System.Reflection
|
|||
public override bool IsSubtypeOf(Type checkBaseType)
|
||||
{
|
||||
TypeInstance curType = this;
|
||||
if (curType.IsBoxed)
|
||||
{
|
||||
curType = curType.UnderlyingType as TypeInstance;
|
||||
if (curType == null)
|
||||
return false;
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
if (curType == checkBaseType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue