]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Return copy of constant type in get_value_type_for_symbol()
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 4 Jul 2020 14:04:22 +0000 (16:04 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 26 Jul 2020 08:41:04 +0000 (10:41 +0200)
vala/valasemanticanalyzer.vala

index b25dac67e2fb0102c5cec9a7a991be84ba5518ab..841c136fca7d522733c1f389b0f43f517968f321 100644 (file)
@@ -249,7 +249,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        return new EnumValueType ((Enum) sym.parent_symbol);
                } else if (sym is Constant) {
                        var c = (Constant) sym;
-                       return c.type_reference;
+                       return c.type_reference.copy ();
                } else if (sym is Property) {
                        var prop = (Property) sym;
                        if (lvalue) {