]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Allow to specify the base_type of an alias
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 4 Jan 2017 15:03:09 +0000 (16:03 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 4 Jan 2017 15:05:05 +0000 (16:05 +0100)
vala/valagirparser.vala

index a4150fd982de5b8cf2c2ca0b969b3d25b05daa70..0c02eef160b1fc20a63156b7d3d6fd337b723f46 100644 (file)
@@ -2179,6 +2179,10 @@ public class Vala.GirParser : CodeVisitor {
                bool array_null_terminated = false;
                current.base_type = element_get_type (parse_type (null, null, true), true, ref no_array_length, ref array_null_terminated);
 
+               if (metadata.has_argument (ArgumentType.BASE_TYPE)) {
+                       current.base_type = parse_type_from_string (metadata.get_string (ArgumentType.BASE_TYPE), true, metadata.get_source_reference (ArgumentType.BASE_TYPE));
+               }
+
                pop_node ();
                end_element ("alias");
        }