diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-03-12 16:51:23 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-09-30 14:43:00 +0200 |
commit | 29a3caef34597b0d9d7f87891d011a67c54dd17a (patch) | |
tree | 9f06d17a486944984fb684c6617e90acad3f8552 /vala/valadatatype.vala | |
parent | 2be23ae7f9aed9b263bcf94a32ac6c1e366db289 (diff) | |
download | vala-29a3caef34597b0d9d7f87891d011a67c54dd17a.tar.gz |
vala: Unify backing symbol instance of data-types
Diffstat (limited to 'vala/valadatatype.vala')
-rw-r--r-- | vala/valadatatype.vala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index f4013136e..02cae4d61 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -40,9 +40,18 @@ public abstract class Vala.DataType : CodeNode { public bool nullable { get; set; } /** + * The referred symbol. + */ + public weak Symbol? symbol { get; private set; } + + /** * The referred type symbol. */ - public weak TypeSymbol type_symbol { get; set; } + public weak TypeSymbol? type_symbol { + get { + return symbol as TypeSymbol; + } + } /** * Specifies that the expression transfers a floating reference. @@ -57,6 +66,10 @@ public abstract class Vala.DataType : CodeNode { private List<DataType> type_argument_list; private static List<DataType> _empty_type_list; + protected DataType.with_symbol (Symbol? symbol) { + this.symbol = symbol; + } + /** * Appends the specified type as generic type argument. * |