diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-12-02 12:06:41 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-12-02 12:10:42 +0100 |
commit | 8677f0975d3db89b4e89c1031e18e206bc3e31a6 (patch) | |
tree | bd2c326a2cb72b545082e4e249aaea4c3443302c /vala/valasymbol.vala | |
parent | b23471650480d8964c2b35aa84159cf46fed3a11 (diff) | |
download | vala-8677f0975d3db89b4e89c1031e18e206bc3e31a6.tar.gz |
vala: Improve error message for unsupported inner types and declarations
Diffstat (limited to 'vala/valasymbol.vala')
-rw-r--r-- | vala/valasymbol.vala | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala index 633719676..790ddd9b9 100644 --- a/vala/valasymbol.vala +++ b/vala/valasymbol.vala @@ -431,59 +431,59 @@ public abstract class Vala.Symbol : CodeNode { } public virtual void add_namespace (Namespace ns) { - Report.error (ns.source_reference, "unexpected declaration"); + Report.error (ns.source_reference, "inner `%s' is not supported in `%s'".printf ("namespace", get_full_name ())); } public virtual void add_class (Class cl) { - Report.error (cl.source_reference, "unexpected declaration"); + Report.error (cl.source_reference, "inner `%s' types are not supported in `%s'".printf ("class", get_full_name ())); } public virtual void add_interface (Interface iface) { - Report.error (iface.source_reference, "unexpected declaration"); + Report.error (iface.source_reference, "inner `%s' types are not supported in `%s'".printf ("interface", get_full_name ())); } public virtual void add_struct (Struct st) { - Report.error (st.source_reference, "unexpected declaration"); + Report.error (st.source_reference, "inner `%s' types are not supported in `%s'".printf ("struct", get_full_name ())); } public virtual void add_enum (Enum en) { - Report.error (en.source_reference, "unexpected declaration"); + Report.error (en.source_reference, "inner `%s' types are not supported in `%s'".printf ("enum", get_full_name ())); } public virtual void add_error_domain (ErrorDomain edomain) { - Report.error (edomain.source_reference, "unexpected declaration"); + Report.error (edomain.source_reference, "inner `%s' types are not supported in `%s'".printf ("errordomain", get_full_name ())); } public virtual void add_delegate (Delegate d) { - Report.error (d.source_reference, "unexpected declaration"); + Report.error (d.source_reference, "inner `%s' types are not supported in `%s'".printf ("delegate", get_full_name ())); } public virtual void add_constant (Constant constant) { - Report.error (constant.source_reference, "unexpected declaration"); + Report.error (constant.source_reference, "constants are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_field (Field f) { - Report.error (f.source_reference, "unexpected declaration"); + Report.error (f.source_reference, "fields are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_method (Method m) { - Report.error (m.source_reference, "unexpected declaration"); + Report.error (m.source_reference, "methods are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_property (Property prop) { - Report.error (prop.source_reference, "unexpected declaration"); + Report.error (prop.source_reference, "properties are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_signal (Signal sig) { - Report.error (sig.source_reference, "unexpected declaration"); + Report.error (sig.source_reference, "signals are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_constructor (Constructor c) { - Report.error (c.source_reference, "unexpected declaration"); + Report.error (c.source_reference, "constructors are not allowed in `%s'".printf (get_full_name ())); } public virtual void add_destructor (Destructor d) { - Report.error (d.source_reference, "unexpected declaration"); + Report.error (d.source_reference, "destructors are not allowed in `%s'".printf (get_full_name ())); } public override string to_string () { |