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

[Vala] Problem with foreach and array ?



Hello

I attached a file making valac crash
to compile with valac -C test.vala

See you

Frederic

PS : Everythings fine if I replace the foreach with a for statement.
public class test<T> {
	T[] data;

	public int index_of(T item) {
		int idx = 0;
		foreach(T it in this.data)
			if (item == it)
				return idx;
		return -1;
	}
}


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