cryptic error message when attempting to iterate over Gee.Map with foreach
void main() {
var collection = new Gee.HashMap<string, int> ();
foreach (var item in collection)
;
}
% valac --pkg gee-0.8 iterator.vala
iterator.vala:4.5-4.36: error: Argument 1: Cannot convert from `int' to `unowned string'
foreach (var item in collection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Works fine when the collection is a Gee.ArrayList
or something else.
Edited by Princeton Ferro