mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Support for obsolete/error/warning on property declaration
This commit is contained in:
parent
0543dfec65
commit
c8f42a0bfc
2 changed files with 18 additions and 5 deletions
|
@ -245,7 +245,7 @@ namespace System
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("Use [CallingConvention(.Stdcall)]", false)]
|
[Obsolete("Use [CallingConvention(.Stdcall)]", false)]
|
||||||
[AttributeUsage(.Method | .Constructor | .Delegate | .Function)]
|
[AttributeUsage(.Method | .Constructor | .Delegate | .Function | .Property)]
|
||||||
public struct StdCallAttribute : Attribute
|
public struct StdCallAttribute : Attribute
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ namespace System
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias | .Interface)]
|
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias | .Interface | .Property)]
|
||||||
public struct ObsoleteAttribute : Attribute
|
public struct ObsoleteAttribute : Attribute
|
||||||
{
|
{
|
||||||
public this(bool isError)
|
public this(bool isError)
|
||||||
|
@ -498,7 +498,7 @@ namespace System
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias)]
|
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias | .Property)]
|
||||||
public struct ErrorAttribute : Attribute
|
public struct ErrorAttribute : Attribute
|
||||||
{
|
{
|
||||||
public this(String error)
|
public this(String error)
|
||||||
|
@ -507,7 +507,7 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias)]
|
[AttributeUsage(.Method | .Constructor | .Class | .Struct | .Alias | .Property)]
|
||||||
public struct WarnAttribute : Attribute
|
public struct WarnAttribute : Attribute
|
||||||
{
|
{
|
||||||
public this(String error)
|
public this(String error)
|
||||||
|
|
|
@ -20890,7 +20890,20 @@ void BfModule::GetMethodCustomAttributes(BfMethodInstance* methodInstance)
|
||||||
{
|
{
|
||||||
if (methodInstance->GetMethodInfoEx()->mMethodCustomAttributes == NULL)
|
if (methodInstance->GetMethodInfoEx()->mMethodCustomAttributes == NULL)
|
||||||
methodInstance->mMethodInfoEx->mMethodCustomAttributes = new BfMethodCustomAttributes();
|
methodInstance->mMethodInfoEx->mMethodCustomAttributes = new BfMethodCustomAttributes();
|
||||||
methodInstance->mMethodInfoEx->mMethodCustomAttributes->mCustomAttributes = GetCustomAttributes(attributeDirective, attrTarget);
|
methodInstance->mMethodInfoEx->mMethodCustomAttributes->mCustomAttributes = GetCustomAttributes(attributeDirective, attrTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((propertyMethodDeclaration != NULL) && (propertyMethodDeclaration->mPropertyDeclaration->mAttributes != NULL))
|
||||||
|
{
|
||||||
|
if (methodInstance->GetMethodInfoEx()->mMethodCustomAttributes != NULL)
|
||||||
|
{
|
||||||
|
GetCustomAttributes(methodInstance->mMethodInfoEx->mMethodCustomAttributes->mCustomAttributes, propertyMethodDeclaration->mPropertyDeclaration->mAttributes, attrTarget);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
methodInstance->GetMethodInfoEx()->mMethodCustomAttributes = new BfMethodCustomAttributes();
|
||||||
|
methodInstance->mMethodInfoEx->mMethodCustomAttributes->mCustomAttributes = GetCustomAttributes(propertyMethodDeclaration->mPropertyDeclaration->mAttributes, attrTarget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customAttributes = methodInstance->GetCustomAttributes();
|
customAttributes = methodInstance->GetCustomAttributes();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue