]> 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>
Sat, 4 Jul 2020 14:04:57 +0000 (16:04 +0200)
vala/valasemanticanalyzer.vala

index 1404f13cd8d10c6732424336f686fc49de6d1c79..8242efd3593d932a58a450ffcf0cba3606df2985 100644 (file)
@@ -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) {