Parcourir la source

Merge pull request #12209 from neikeq/m

Mono: Fix warning about exported static fields
Rémi Verschelde il y a 8 ans
Parent
commit
e4ec0d007c
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      modules/mono/csharp_script.cpp

+ 2 - 1
modules/mono/csharp_script.cpp

@@ -1271,7 +1271,8 @@ bool CSharpScript::_update_exports() {
 				GDMonoField *field = fields[i];
 
 				if (field->is_static()) {
-					ERR_PRINTS("Cannot export field because it is static: " + top->get_full_name() + "." + field->get_name());
+					if (field->has_attribute(CACHED_CLASS(ExportAttribute)))
+						ERR_PRINTS("Cannot export field because it is static: " + top->get_full_name() + "." + field->get_name());
 					continue;
 				}