]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix base access in generic classes
authorJürg Billeter <j@bitron.ch>
Mon, 12 Jul 2010 20:02:16 +0000 (22:02 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 12 Jul 2010 20:02:16 +0000 (22:02 +0200)
Fixes bug 623685.

vala/valabaseaccess.vala

index 4872565ee0c78edb398d4068f6c7b43435e678ff..b434f568b9e28f04658a81ed4209baaeac289e2b 100644 (file)
@@ -1,6 +1,6 @@
 /* valabaseaccess.vala
  *
- * Copyright (C) 2006-2008  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -78,7 +78,12 @@ public class Vala.BaseAccess : Expression {
                        Report.error (source_reference, "Base access invalid without base class");
                        return false;
                } else {
-                       value_type = new ObjectType (analyzer.current_class.base_class);
+                       foreach (var base_type in analyzer.current_class.get_base_types ()) {
+                               if (base_type.data_type is Class) {
+                                       value_type = base_type.copy ();
+                                       value_type.value_owned = false;
+                               }
+                       }
                }
 
                symbol_reference = value_type.data_type;