[vala] Check accessibility of type arguments



commit 0afb1af8891695dd5426b9ffaabd50e04da870ec
Author: Luca Bruno <lucabru src gnome org>
Date:   Sat Jan 14 22:44:30 2012 +0100

    Check accessibility of type arguments

 vala/valadatatype.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala
index c4384bf..c553dcf 100644
--- a/vala/valadatatype.vala
+++ b/vala/valadatatype.vala
@@ -392,6 +392,11 @@ public abstract class Vala.DataType : CodeNode {
 
 	// check whether this type is at least as accessible as the specified symbol
 	public virtual bool is_accessible (Symbol sym) {
+		foreach (var type_arg in get_type_arguments ()) {
+			if (!type_arg.is_accessible (sym)) {
+				return false;
+			}
+		}
 		if (data_type != null) {
 			return data_type.is_accessible (sym);
 		}



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