summaryrefslogtreecommitdiff
path: root/vala/valaproperty.vala
diff options
context:
space:
mode:
authorLevi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com>2009-04-15 22:37:51 +0200
committerJürg Billeter <j@bitron.ch>2009-04-15 22:37:51 +0200
commitdbdb5df5951ae13870e02ff3dd018b37bd4bc78b (patch)
tree49ec723e5ee48004466410ebafc330a742dacdc9 /vala/valaproperty.vala
parent91093cf994f69862364e44222fb30991436140d8 (diff)
downloadvala-dbdb5df5951ae13870e02ff3dd018b37bd4bc78b.tar.gz
Fix crash with invalid property default expressions
Do not check type compatibility on the default expression of a property if it fails semantic analysis. Fixes bug 576122.
Diffstat (limited to 'vala/valaproperty.vala')
-rw-r--r--vala/valaproperty.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 241fd3654..8d666dedb 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -451,7 +451,7 @@ public class Vala.Property : Member, Lockable {
}
}
- if (default_expression != null && !(default_expression.value_type.compatible (property_type))) {
+ if (default_expression != null && !default_expression.error && !(default_expression.value_type.compatible (property_type))) {
error = true;
Report.error (default_expression.source_reference, "Expected initializer of type `%s' but got `%s'".printf (property_type.to_string (), default_expression.value_type.to_string ()));
}