Commit 640f1db2 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

implement get_type_parameter_index

2007-03-07  Jürg Billeter  <j@bitron.ch>

	* vala/valaclass.vala: implement get_type_parameter_index

svn path=/trunk/; revision=227
parent 58e8fdd5
2007-03-07 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala: implement get_type_parameter_index
2007-03-07 Raffaele Sandrini <rasa@gmx.ch> 2007-03-07 Raffaele Sandrini <rasa@gmx.ch>
* vala/valasemanticanalyzer.vala: check whether a class implements all * vala/valasemanticanalyzer.vala: check whether a class implements all
......
/* valaclass.vala /* valaclass.vala
* *
* Copyright (C) 2006 Jürg Billeter * Copyright (C) 2006-2007 Jürg Billeter
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -363,4 +363,15 @@ public class Vala.Class : DataType { ...@@ -363,4 +363,15 @@ public class Vala.Class : DataType {
return false; return false;
} }
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;
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment