aboutsummaryrefslogtreecommitdiff
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-10-18 08:40:13 +0200
committerGitHub2017-10-18 08:40:13 +0200
commite4ec0d007ccfbdab4a7c40460aa1cd524e7b0bac (patch)
treeee361c1b1b4238c095a8dd6080f1d747baafc300 /modules/mono/csharp_script.cpp
parent9bead2e06fa2866f7fb7cea8eefb6a4fd3225b23 (diff)
parentb1d106adb63714d9cd124b7d6f8268b0975e2eb9 (diff)
downloadgodot-e4ec0d007ccfbdab4a7c40460aa1cd524e7b0bac.tar.gz
godot-e4ec0d007ccfbdab4a7c40460aa1cd524e7b0bac.tar.zst
godot-e4ec0d007ccfbdab4a7c40460aa1cd524e7b0bac.zip
Merge pull request #12209 from neikeq/m
Mono: Fix warning about exported static fields
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r--modules/mono/csharp_script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 7acfaaed8..ba8c7df9c 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;
}