From: Rico Tzschichholz Date: Sat, 4 Jul 2020 14:04:22 +0000 (+0200) Subject: vala: Return copy of constant type in get_value_type_for_symbol() X-Git-Tag: 0.49.1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f79935ef819726e1852a8bf84347ef52ed2b4e1c;p=thirdparty%2Fvala.git vala: Return copy of constant type in get_value_type_for_symbol() --- diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 1404f13cd..8242efd35 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -278,7 +278,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return new EnumValueType ((Enum) sym.parent_symbol); } else if (sym is Constant) { unowned Constant c = (Constant) sym; - return c.type_reference; + return c.type_reference.copy (); } else if (sym is Property) { unowned Property prop = (Property) sym; if (lvalue) {