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

Fixed minlib Type

This commit is contained in:
Brian Fiete 2020-07-02 11:45:30 -07:00
parent 0c946de3ca
commit 9f04792baa

View file

@ -470,13 +470,6 @@ namespace System
return FieldInfo.Enumerator(null, bindingFlags);
}
public Result<T> GetCustomAttribute<T>() where T : Attribute
{
if (var typeInstance = this as TypeInstance)
return typeInstance.[Friend]GetCustomAttribute<T>(typeInstance.[Friend]mCustomAttributesIdx);
return .Err;
}
public override void ToString(String strBuffer)
{
GetFullName(strBuffer);
@ -752,22 +745,6 @@ namespace System.Reflection
{
return FieldInfo.Enumerator(this, bindingFlags);
}
Result<T> GetCustomAttribute<T>(int customAttributeIdx) where T : Attribute
{
if (customAttributeIdx == -1)
return .Err;
void* data = mCustomAttrDataPtr[customAttributeIdx];
T attrInst = ?;
switch (AttributeInfo.GetCustomAttribute(data, typeof(T), &attrInst))
{
case .Ok: return .Ok(attrInst);
default:
return .Err;
}
}
}
[Ordered, AlwaysInclude(AssumeInstantiated=true)]