Skip to content

Commit

Permalink
add reference counter equal to global const for classes (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
astrophysik authored Aug 2, 2024
1 parent 42ffba5 commit a4d9462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/code-gen/files/const-vars-init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void ConstVarsInit::compile_const_init_part(CodeGenerator &W, const ConstantsBat
for (VarPtr var: other_const_vars.vars_by_dep_level(dep_level)) {
W << InitConstVar(var);
const TypeData *type_data = var->tinf_node.get_type();
if (vk::any_of_equal(type_data->ptype(), tp_array, tp_mixed, tp_string)) {
if (vk::any_of_equal(type_data->ptype(), tp_array, tp_mixed, tp_string, tp_Class)) {
W << var->name;
if (type_data->use_optional()) {
W << ".val()";
Expand Down

0 comments on commit a4d9462

Please sign in to comment.