diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-11-17 22:22:03 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-02-24 19:59:24 +0100 |
commit | da4ff03c5ca427cf7cc4574f52f5190dc1b0dfb9 (patch) | |
tree | 184fd1c8e207f2ee137b2d9bded274a855e4bb37 /codegen/valagtypemodule.vala | |
parent | a1530007a7c1b829cdf5876f4090d30b502c1bc3 (diff) | |
download | vala-da4ff03c5ca427cf7cc4574f52f5190dc1b0dfb9.tar.gz |
codegen: Emit GType definition for error domains
Fixes https://gitlab.gnome.org/GNOME/vala/issues/699
Diffstat (limited to 'codegen/valagtypemodule.vala')
-rw-r--r-- | codegen/valagtypemodule.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala index 28a29744c..7bc8eaf83 100644 --- a/codegen/valagtypemodule.vala +++ b/codegen/valagtypemodule.vala @@ -2408,6 +2408,18 @@ public class Vala.GTypeModule : GErrorModule { } } + public override void visit_error_domain (ErrorDomain edomain) { + base.visit_error_domain (edomain); + + if (get_ccode_has_type_id (edomain)) { + push_line (edomain.source_reference); + var type_fun = new ErrorDomainRegisterFunction (edomain); + type_fun.init_from_type (context, false, false); + cfile.add_type_member_definition (type_fun.get_definition ()); + pop_line (); + } + } + public override void visit_method_call (MethodCall expr) { var ma = expr.call as MemberAccess; var mtype = expr.call.value_type as MethodType; |