]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Fix circular reference in EnumValueType
authorPrinceton Ferro <princetonferro@gmail.com>
Sun, 1 Mar 2020 08:54:13 +0000 (09:54 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 1 Mar 2020 11:16:30 +0000 (12:16 +0100)
vala/valaenumvaluetype.vala

index 6c6aca3986a795026c778905475ffc3e58ccc597..027c30db13b02b00a12ebac4785552c756ece1f8 100644 (file)
@@ -50,7 +50,7 @@ public class Vala.EnumValueType : ValueType {
                        to_string_method.is_extern = true;
                        to_string_method.set_attribute_string ("CCode", "cheader_filename", "glib-object.h");
                        to_string_method.owner = type_symbol.scope;
-                       to_string_method.this_parameter = new Parameter ("this", this);
+                       to_string_method.this_parameter = new Parameter ("this", copy ());
                        to_string_method.scope.add (to_string_method.this_parameter.name, to_string_method.this_parameter);
                }
                return to_string_method;