diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-04-10 17:13:35 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-04-11 09:31:39 +0200 |
commit | bedd5126ceba2522fcce9b7a6e3ecc7c3978b808 (patch) | |
tree | 9aaefe97fc89f61e725c9fabcc92901762d90adb /vala/valastruct.vala | |
parent | 8a81ec9046e39182f46bec19ef03998b5e55ff33 (diff) | |
download | vala-bedd5126ceba2522fcce9b7a6e3ecc7c3978b808.tar.gz |
vala: Add GenericSymbol interface for symbols supporting type-parameters
Diffstat (limited to 'vala/valastruct.vala')
-rw-r--r-- | vala/valastruct.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 5cce4b24b..198ff3462 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -25,7 +25,7 @@ using GLib; /** * Represents a struct declaration in the source code. */ -public class Vala.Struct : TypeSymbol { +public class Vala.Struct : TypeSymbol, GenericSymbol { private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> (); private List<Constant> constants = new ArrayList<Constant> (); private List<Field> fields = new ArrayList<Field> (); @@ -187,6 +187,10 @@ public class Vala.Struct : TypeSymbol { return type_parameters; } + public bool has_type_parameters () { + return (type_parameters != null && type_parameters.size > 0); + } + /** * Adds the specified constant as a member to this struct. * |