From: Jürg Billeter Date: Wed, 10 Mar 2010 06:56:00 +0000 (+0100) Subject: Mark return type of `as` operator as nullable X-Git-Tag: 0.8.0~219 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bb99ae85792f22c2a21317f0c0150e81a58f35b;p=thirdparty%2Fvala.git Mark return type of `as` operator as nullable Fixes bug 612382. --- diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala index 83b7f41e9..a17f09f32 100644 --- a/vala/valacastexpression.vala +++ b/vala/valacastexpression.vala @@ -138,6 +138,10 @@ public class Vala.CastExpression : Expression { value_type = type_reference; value_type.value_owned = inner.value_type.value_owned; + if (is_silent_cast) { + value_type.nullable = true; + } + inner.target_type = inner.value_type.copy (); return !error;