diff options
author | Jiří Zárevúcky <zarevucky.jiri@gmail.com> | 2010-10-19 18:01:20 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-10-19 18:01:20 +0200 |
commit | 853f092fcd2a17013ac7b7dbac481eb8bef9b434 (patch) | |
tree | 1d23eb355214970cdd60b48b3c79b6285e85219a /vala/valalocalvariable.vala | |
parent | 1caa4c70a09a9a612d722c10e0e82270552a2775 (diff) | |
download | vala-853f092fcd2a17013ac7b7dbac481eb8bef9b434.tar.gz |
Report error when variable or property type is void
Fixes bug 628693.
Diffstat (limited to 'vala/valalocalvariable.vala')
-rw-r--r-- | vala/valalocalvariable.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala index 5ef1107fb..4ed1ec226 100644 --- a/vala/valalocalvariable.vala +++ b/vala/valalocalvariable.vala @@ -85,6 +85,11 @@ public class Vala.LocalVariable : Variable { checked = true; if (variable_type != null) { + if (variable_type is VoidType) { + error = true; + Report.error (source_reference, "'void' not supported as variable type"); + return false; + } variable_type.check (analyzer); } |