From: Florian Brosch Date: Tue, 17 Jan 2012 21:08:19 +0000 (+0100) Subject: Check left parameter of is X-Git-Tag: 0.15.1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=516e73a9b12c7d096d42976518949c1b641540e4;p=thirdparty%2Fvala.git Check left parameter of is --- 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;