Unable to assign to generic delegates with missing type arguments
Submitted by Evan Nemerson
Link to original bug (#687142)
Description
If you try to assign to a generic delegate without a type argument valac will emit an error:
public delegate uint Foo<T> (T v);
public static uint bar (string foo) {
return GLib.str_hash (foo);
}
private static int main (string[] args) {
Foo func = bar;
return 0;
}
wtf.vala:8.7-8.16: error: Assignment: Cannot convert from `bar' to `Foo'
Foo func = bar;
^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Version: 0.17.x
Edited by Rico Tzschichholz