Fix error message when exporting a write-only property without a setter
(cherry picked from commit aca0cede67
)
This commit is contained in:
parent
01f23480e1
commit
f14e569ab3
|
@ -2608,14 +2608,14 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
|
|||
if (!property->has_getter()) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (exported)
|
||||
ERR_PRINTS("Read-only property cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||
ERR_PRINT("Cannot export a property without a getter: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
if (!property->has_setter()) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (exported)
|
||||
ERR_PRINTS("Write-only property (without getter) cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||
ERR_PRINT("Cannot export a property without a setter: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue