diff options
author | Jürg Billeter <j@bitron.ch> | 2010-03-10 07:52:06 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-03-10 07:52:06 +0100 |
commit | db0b66630d8edd216916dec20a8bbabe894b2499 (patch) | |
tree | 315bc160687f4cfaba0e649d28cdc6970aa47bf9 /vala/valacastexpression.vala | |
parent | ed08578b700621042a7b081853f2ae72cf106ae2 (diff) | |
download | vala-db0b66630d8edd216916dec20a8bbabe894b2499.tar.gz |
Fix (!) non-null cast for structs
Fixes bug 612380.
Diffstat (limited to 'vala/valacastexpression.vala')
-rw-r--r-- | vala/valacastexpression.vala | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala index 864c40925..83b7f41e9 100644 --- a/vala/valacastexpression.vala +++ b/vala/valacastexpression.vala @@ -1,6 +1,6 @@ /* valacastexpression.vala * - * Copyright (C) 2006-2009 Jürg Billeter + * Copyright (C) 2006-2010 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -127,12 +127,8 @@ public class Vala.CastExpression : Expression { if (is_non_null_cast) { // (!) non-null cast - value_type = inner.value_type.copy (); - value_type.nullable = false; - - inner.target_type = inner.value_type.copy (); - - return !error; + type_reference = inner.value_type.copy (); + type_reference.nullable = false; } type_reference.check (analyzer); |