소스 검색

Mono: Fix warning about exported static fields

Ignacio Etcheverry 8 년 전
부모
커밋
b1d106adb6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;
 				}