From b1d106adb63714d9cd124b7d6f8268b0975e2eb9 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 18 Oct 2017 08:34:17 +0200 Subject: [PATCH] Mono: Fix warning about exported static fields --- modules/mono/csharp_script.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 7acfaaed866..ba8c7df9cc7 100644 --- a/modules/mono/csharp_script.cpp +++ b/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; }