diff options
author | Jürg Billeter <j@bitron.ch> | 2010-12-23 11:35:04 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-12-23 11:39:37 +0100 |
commit | fa45974389f64eef60205c72272bb0f4a1dcde35 (patch) | |
tree | f42f6bf7dc0358a444ba6c75e8e508145ee1a313 /vala/valaparameter.vala | |
parent | 645b7ce16d84055601f5a519f2ca538029299fff (diff) | |
download | vala-fa45974389f64eef60205c72272bb0f4a1dcde35.tar.gz |
Do not allow default values for ref parameters
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 aea16ef38..7c52e9c68 100644 --- a/vala/valaparameter.vala +++ b/vala/valaparameter.vala @@ -264,6 +264,8 @@ public class Vala.Parameter : Variable { Report.warning (source_reference, "`null' incompatible with parameter type `%s`".printf (variable_type.to_string ())); } else if (!(initializer is NullLiteral) && direction == ParameterDirection.OUT) { Report.error (source_reference, "only `null' is allowed as default value for out parameters"); + } else if (direction == ParameterDirection.REF) { + Report.error (source_reference, "default value not allowed for ref parameter"); } } |