Merge pull request #42414 from eduardohmrodrigues/master

Fix error message when exporting a write-only property without a setter
This commit is contained in:
Rémi Verschelde 2020-09-29 21:14:06 +02:00 committed by GitHub
commit 475f4faead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2702,7 +2702,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
if (!property->has_getter()) { if (!property->has_getter()) {
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
if (exported) { if (exported) {
ERR_PRINT("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 #endif
return false; return false;
@ -2710,7 +2710,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
if (!property->has_setter()) { if (!property->has_setter()) {
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
if (exported) { if (exported) {
ERR_PRINT("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 #endif
return false; return false;