]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Check left parameter of is
authorFlorian Brosch <flo.brosch@gmail.com>
Tue, 17 Jan 2012 21:08:19 +0000 (22:08 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Tue, 17 Jan 2012 21:38:41 +0000 (22:38 +0100)
vala/valatypecheck.vala

index 749401db58c7c5e1b4729e71f51a8edc979e367e..de3d30a2906aa8c0625cc74a113ef5aa8fa5ec0d 100644 (file)
@@ -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;