summaryrefslogtreecommitdiff
path: root/vala/valathrowstatement.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-06-08 13:06:57 +0200
committerJürg Billeter <j@bitron.ch>2010-06-08 13:06:57 +0200
commitdd7aae1a882bd0fc11f648476377b637de72db3e (patch)
tree8753c66b18d71ea0ec4bffac23cec9e66d39fa8a /vala/valathrowstatement.vala
parent31cb78817cb9cc87c18f0d9b12e6a4efa4ec5222 (diff)
downloadvala-dd7aae1a882bd0fc11f648476377b637de72db3e.tar.gz
dova: Fix temporary variables used for throw statements
Diffstat (limited to 'vala/valathrowstatement.vala')
-rw-r--r--vala/valathrowstatement.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/vala/valathrowstatement.vala b/vala/valathrowstatement.vala
index e3d5da9eb..f94654072 100644
--- a/vala/valathrowstatement.vala
+++ b/vala/valathrowstatement.vala
@@ -79,7 +79,11 @@ public class Vala.ThrowStatement : CodeNode, Statement {
checked = true;
- error_expression.target_type = new ErrorType (null, null, source_reference);
+ if (analyzer.context.profile == Profile.GOBJECT) {
+ error_expression.target_type = new ErrorType (null, null, source_reference);
+ } else {
+ error_expression.target_type = analyzer.error_type.copy ();
+ }
error_expression.target_type.value_owned = true;
if (error_expression != null) {