From: Rico Tzschichholz Date: Wed, 3 Nov 2021 17:47:31 +0000 (+0100) Subject: genie: Accept INTERR token before type arguments when parsing type X-Git-Tag: 0.52.8~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=368b498d821c085356bd6762d48b8d05c919a37b;p=thirdparty%2Fvala.git genie: Accept INTERR token before type arguments when parsing type Fixes https://gitlab.gnome.org/GNOME/vala/issues/1245 --- diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala index 92a92be65..a9ef56513 100644 --- a/vala/valagenieparser.vala +++ b/vala/valagenieparser.vala @@ -506,6 +506,7 @@ public class Vala.Genie.Parser : CodeVisitor { bool is_dynamic = accept (TokenType.DYNAMIC); bool value_owned = owned_by_default; + bool is_nullable = false; if (owned_by_default) { if (accept (TokenType.UNOWNED)) { @@ -562,6 +563,8 @@ public class Vala.Genie.Parser : CodeVisitor { sym = parse_symbol_name (); } + is_nullable = accept (TokenType.INTERR); + type_arg_list = parse_type_argument_list (false); type = new UnresolvedType.from_symbol (sym, get_src (begin)); @@ -577,7 +580,7 @@ public class Vala.Genie.Parser : CodeVisitor { } if (!(type is PointerType)) { - type.nullable = accept (TokenType.INTERR); + type.nullable = is_nullable; } if (is_array) {