summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2023-01-22 11:07:48 +0200
committerDmitrii Maganov <vonagam@gmail.com>2023-01-27 05:28:08 +0200
commitabe6d6723219b592829fd9ba2a2c78950c83d64e (patch)
tree374101c2ae82959906d06c6a573d6cc63f5b0151 /modules/gdscript/gdscript_analyzer.cpp
parentd1e5903c67956707948b1de370b807e3aad395b7 (diff)
downloadredot-engine-abe6d6723219b592829fd9ba2a2c78950c83d64e.tar.gz
GDScript: Fix test for read-only state of constants
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index d7f6126207..f6385dd132 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -879,7 +879,7 @@ void GDScriptAnalyzer::resolve_class_member(GDScriptParser::ClassNode *p_class,
current_enum = prev_enum;
- dictionary.set_read_only(true);
+ dictionary.make_read_only();
member.m_enum->set_datatype(enum_type);
member.m_enum->dictionary = dictionary;
@@ -3892,7 +3892,7 @@ void GDScriptAnalyzer::const_fold_array(GDScriptParser::ArrayNode *p_array, bool
array[i] = p_array->elements[i]->reduced_value;
}
if (p_is_const) {
- array.set_read_only(true);
+ array.make_read_only();
}
p_array->is_constant = true;
p_array->reduced_value = array;
@@ -3919,7 +3919,7 @@ void GDScriptAnalyzer::const_fold_dictionary(GDScriptParser::DictionaryNode *p_d
dict[element.key->reduced_value] = element.value->reduced_value;
}
if (p_is_const) {
- dict.set_read_only(true);
+ dict.make_read_only();
}
p_dictionary->is_constant = true;
p_dictionary->reduced_value = dict;