vala r2023 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2023 - in trunk: . vala
- Date: Fri, 14 Nov 2008 21:36:16 +0000 (UTC)
Author: juergbi
Date: Fri Nov 14 21:36:16 2008
New Revision: 2023
URL: http://svn.gnome.org/viewvc/vala?rev=2023&view=rev
Log:
2008-11-14 JÃrg Billeter <j bitron ch>
* vala/valasemanticanalyzer.vala:
Set target_type for member initializers
Modified:
trunk/ChangeLog
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Fri Nov 14 21:36:16 2008
@@ -599,8 +599,6 @@
}
public void visit_member_initializer (MemberInitializer init, DataType type) {
- init.check (this);
-
init.symbol_reference = symbol_lookup_inherited (type.data_type, init.name);
if (!(init.symbol_reference is Field || init.symbol_reference is Property)) {
init.error = true;
@@ -625,7 +623,12 @@
return;
}
}
- if (init.initializer.value_type == null || !init.initializer.value_type.compatible (member_type)) {
+
+ init.initializer.target_type = member_type;
+
+ init.check (this);
+
+ if (init.initializer.value_type == null || !init.initializer.value_type.compatible (init.initializer.target_type)) {
init.error = true;
Report.error (init.source_reference, "Invalid type for member `%s'".printf (init.name));
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]