diff options
author | Simon Werbeck <simon.werbeck@gmail.com> | 2016-10-02 00:20:59 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-10-06 14:53:40 +0200 |
commit | 78588e6cf96a6f239840f728aedc2ecf5aabf7de (patch) | |
tree | eb0517ad3f379c0a8e4c5ee39227bf79100c53f3 /vala/valaparameter.vala | |
parent | 1fcd716d3b9b3d7b740a4c488cd6a28c0e5f0414 (diff) | |
download | vala-78588e6cf96a6f239840f728aedc2ecf5aabf7de.tar.gz |
vala: Check accessibility of default arguments
https://bugzilla.gnome.org/show_bug.cgi?id=648030
Diffstat (limited to 'vala/valaparameter.vala')
-rw-r--r-- | vala/valaparameter.vala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala index b55374c37..67d172ebc 100644 --- a/vala/valaparameter.vala +++ b/vala/valaparameter.vala @@ -174,6 +174,8 @@ public class Vala.Parameter : Variable { Report.error (initializer.source_reference, "Cannot convert from `%s' to `%s'".printf (initializer.value_type.to_string (), variable_type.to_string ())); } else if (direction == ParameterDirection.REF) { Report.error (source_reference, "default value not allowed for ref parameter"); + } else if (!initializer.is_accessible (this)) { + Report.error (initializer.source_reference, "default value is less accessible than method `%s'".printf (parent_symbol.get_full_name ())); } } |