Add support for different access level for scripting property functions

This commit is contained in:
Wojciech Figat
2022-10-27 15:14:34 +02:00
parent 28dda32f0e
commit 52e0e70908
2 changed files with 29 additions and 70 deletions

View File

@@ -892,8 +892,6 @@ namespace Flax.Build.Bindings
{
if (propertyInfo.IsStatic != functionInfo.IsStatic)
throw new Exception($"Property {propertyName} in class {classInfo.Name} has to have both getter and setter methods static or non-static (line {context.Tokenizer.CurrentLine}).");
if (propertyInfo.Access != functionInfo.Access)
throw new Exception($"Property {propertyName} in class {classInfo.Name} has to have both getter and setter methods with the same access level (line {context.Tokenizer.CurrentLine}).");
}
if (isGetter && propertyInfo.Getter != null)