summaryrefslogtreecommitdiff
path: root/vala/valasymbolresolver.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-03-13 20:56:02 +0100
committerJürg Billeter <j@bitron.ch>2010-03-13 20:56:02 +0100
commit05c56ab638f5189d802a2506bc4553605ac9a44f (patch)
tree509f989cff7fb8e21fc1c577482eb046b2201649 /vala/valasymbolresolver.vala
parent84b6b23be9a93fc1d17b2b8a9f5134e0f3054ccc (diff)
downloadvala-05c56ab638f5189d802a2506bc4553605ac9a44f.tar.gz
dova: Classes derive from Object by default
Diffstat (limited to 'vala/valasymbolresolver.vala')
-rw-r--r--vala/valasymbolresolver.vala13
1 files changed, 12 insertions, 1 deletions
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 946048455..15e63821f 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;
}