[vala] Fix base access in generic classes



commit 202a0772df37909e1e3c6660946d7ba397991af5
Author: Jürg Billeter <j bitron ch>
Date:   Mon Jul 12 22:02:16 2010 +0200

    Fix base access in generic classes
    
    Fixes bug 623685.

 vala/valabaseaccess.vala |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/vala/valabaseaccess.vala b/vala/valabaseaccess.vala
index 4872565..b434f56 100644
--- a/vala/valabaseaccess.vala
+++ b/vala/valabaseaccess.vala
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]