[vala] Check left parameter of is
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Check left parameter of is
- Date: Tue, 17 Jan 2012 21:47:25 +0000 (UTC)
commit 516e73a9b12c7d096d42976518949c1b641540e4
Author: Florian Brosch <flo brosch gmail com>
Date: Tue Jan 17 22:08:19 2012 +0100
Check left parameter of is
vala/valatypecheck.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vala/valatypecheck.vala b/vala/valatypecheck.vala
index 749401d..de3d30a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]