[vala] Do not support instance field initializers in structs
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Do not support instance field initializers in structs
- Date: Wed, 24 Feb 2010 22:12:55 +0000 (UTC)
commit b8193d8eb3f2fd50628dff2d1a30504ea885e184
Author: Luca Bruno <lethalman88 gmail com>
Date: Wed Feb 24 23:00:11 2010 +0100
Do not support instance field initializers in structs
Fixes bug 567711.
vala/valastruct.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 6ce33cc..7f933f0 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -792,6 +792,12 @@ public class Vala.Struct : TypeSymbol {
Report.error (f.source_reference, "Recursive value types are not allowed");
return false;
}
+
+ if (f.binding == MemberBinding.INSTANCE && f.initializer != null) {
+ error = true;
+ Report.error (f.source_reference, "Instance field initializers not supported");
+ return false;
+ }
}
foreach (Constant c in constants) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]