summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-26 19:02:27 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-26 19:02:27 +0100
commitc0f1ed57c44253c88a7d27e9727a305fb2155e51 (patch)
treec024aec9607b5b2e1215fb57810dca5c8a645d90 /modules/gdscript/gdscript_compiler.cpp
parenta12ecd4c95dbb7029cb0e37fb44d473ab53534f8 (diff)
parent281c8c75d321570c0f47e68171260cadf8c5a817 (diff)
Merge pull request #73915 from vonagam/fix-conversions-from-native-member
GDScript: Fix conversions from native members accessed by identifier
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 9e1dca16ac..d0c2cb43a6 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -238,7 +238,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
// Try class members.
if (_is_class_member_property(codegen, identifier)) {
// Get property.
- GDScriptCodeGenerator::Address temp = codegen.add_temporary(); // TODO: Could get the type of the class member here.
+ GDScriptCodeGenerator::Address temp = codegen.add_temporary(_gdtype_from_datatype(p_expression->get_datatype(), codegen.script));
gen->write_get_member(temp, identifier);
return temp;
}