[vala] dova: Classes derive from Object by default
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] dova: Classes derive from Object by default
- Date: Sat, 13 Mar 2010 20:01:32 +0000 (UTC)
commit 05c56ab638f5189d802a2506bc4553605ac9a44f
Author: Jürg Billeter <j bitron ch>
Date: Sat Mar 13 20:56:02 2010 +0100
dova: Classes derive from Object by default
vala/valasymbolresolver.vala | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 9460484..15e6382 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -1,6 +1,6 @@
/* valasymbolresolver.vala
*
- * Copyright (C) 2006-2009 Jürg Billeter
+ * Copyright (C) 2006-2010 Jürg Billeter
* Copyright (C) 2006-2008 Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
@@ -74,6 +74,17 @@ public class Vala.SymbolResolver : CodeVisitor {
}
}
+ if (context.profile == Profile.DOVA) {
+ // classes derive from Object by default
+ if (cl.base_class == null) {
+ var object_class = (Class) root_symbol.scope.lookup ("Dova").scope.lookup ("Object");
+ if (cl != object_class) {
+ cl.add_base_type (new ObjectType (object_class));
+ cl.base_class = object_class;
+ }
+ }
+ }
+
current_scope = current_scope.parent_scope;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]