diff options
author | Jürg Billeter <j@bitron.ch> | 2008-11-28 12:25:24 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-11-28 12:25:24 +0000 |
commit | d9d324c1a9a2fba9d91b23cdc80e7e1e51da620b (patch) | |
tree | 1fb9ab7104bc46f5f517ecb074cc0782ff8340fb /vala/valainterface.vala | |
parent | b3edafecb598c3018dcddee382fa4c5fe124d7aa (diff) | |
download | vala-d9d324c1a9a2fba9d91b23cdc80e7e1e51da620b.tar.gz |
Fix method checking with generic base types, fixes bug 511286
2008-11-28 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala:
* vala/valadatatype.vala:
* vala/valagenerictype.vala:
* vala/valainterface.vala:
* vala/valamethod.vala:
* vala/valaobjecttypesymbol.vala:
* vala/valasymbolresolver.vala:
Fix method checking with generic base types, fixes bug 511286
svn path=/trunk/; revision=2068
Diffstat (limited to 'vala/valainterface.vala')
-rw-r--r-- | vala/valainterface.vala | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/vala/valainterface.vala b/vala/valainterface.vala index ee5385314..9d7824a2e 100644 --- a/vala/valainterface.vala +++ b/vala/valainterface.vala @@ -27,8 +27,6 @@ using Gee; * Represents a class declaration in the source code. */ public class Vala.Interface : ObjectTypeSymbol { - private Gee.List<TypeParameter> type_parameters = new ArrayList<TypeParameter> (); - private Gee.List<DataType> prerequisites = new ArrayList<DataType> (); private Gee.List<Method> methods = new ArrayList<Method> (); @@ -95,26 +93,6 @@ public class Vala.Interface : ObjectTypeSymbol { } /** - * Appends the specified parameter to the list of type parameters. - * - * @param p a type parameter - */ - public void add_type_parameter (TypeParameter p) { - type_parameters.add (p); - p.type = this; - scope.add (p.name, p); - } - - /** - * Returns a copy of the type parameter list. - * - * @return list of type parameters - */ - public Gee.List<TypeParameter> get_type_parameters () { - return new ReadOnlyList<TypeParameter> (type_parameters); - } - - /** * Adds the specified interface or class to the list of prerequisites of * this interface. * @@ -355,7 +333,7 @@ public class Vala.Interface : ObjectTypeSymbol { type.accept (visitor); } - foreach (TypeParameter p in type_parameters) { + foreach (TypeParameter p in get_type_parameters ()) { p.accept (visitor); } @@ -502,17 +480,6 @@ public class Vala.Interface : ObjectTypeSymbol { return type_id; } - public override int get_type_parameter_index (string name) { - int i = 0; - foreach (TypeParameter parameter in type_parameters) { - if (parameter.name == name) { - return i; - } - i++; - } - return -1; - } - public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < prerequisites.size; i++) { if (prerequisites[i] == old_type) { @@ -594,7 +561,7 @@ public class Vala.Interface : ObjectTypeSymbol { type.check (analyzer); } - foreach (TypeParameter p in type_parameters) { + foreach (TypeParameter p in get_type_parameters ()) { p.check (analyzer); } |