summaryrefslogtreecommitdiff
path: root/vala/valacastexpression.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-03-10 07:52:06 +0100
committerJürg Billeter <j@bitron.ch>2010-03-10 07:52:06 +0100
commitdb0b66630d8edd216916dec20a8bbabe894b2499 (patch)
tree315bc160687f4cfaba0e649d28cdc6970aa47bf9 /vala/valacastexpression.vala
parented08578b700621042a7b081853f2ae72cf106ae2 (diff)
downloadvala-db0b66630d8edd216916dec20a8bbabe894b2499.tar.gz
Fix (!) non-null cast for structs
Fixes bug 612380.
Diffstat (limited to 'vala/valacastexpression.vala')
-rw-r--r--vala/valacastexpression.vala10
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);