diff options
author | Florian Brosch <flo.brosch@gmail.com> | 2012-01-17 22:08:19 +0100 |
---|---|---|
committer | Florian Brosch <flo.brosch@gmail.com> | 2012-01-17 22:38:41 +0100 |
commit | 516e73a9b12c7d096d42976518949c1b641540e4 (patch) | |
tree | 461a76752c7d6186826e0e035a6027ef60faed57 /vala | |
parent | 39d76db5efee49bb7e9c97f8b4a99a95ae1c6297 (diff) | |
download | vala-516e73a9b12c7d096d42976518949c1b641540e4.tar.gz |
Check left parameter of is
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valatypecheck.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vala/valatypecheck.vala b/vala/valatypecheck.vala index 749401db5..de3d30a29 100644 --- a/vala/valatypecheck.vala +++ b/vala/valatypecheck.vala @@ -104,6 +104,12 @@ public class Vala.TypeCheck : Expression { type_reference.check (context); + if (expression.value_type == null) { + Report.error (expression.source_reference, "invalid left operand"); + error = true; + return false; + } + if (type_reference.data_type == null) { /* if type resolving didn't succeed, skip this check */ error = true; |