valac could be more explicit when a wrong argument is passed.
@mathieudu
Submitted by Mathieu Duponchelle Link to original bug (#727203)
Description
Basically, I tried to use Gst.Bus.add_watch, but as the function is renamed by vala bindings, I was missing a parameter, and passing a wrong type in place of the first argument.
This was the error :
gms-waveformer.vala:52.25-52.46: error: Argument 1: Cannot convert from `Gst.BusFunc' to `int'
bus.add_watch ((BusFunc) bus_callback);
When I cast it to int to check, the error was more explicit:
gms-waveformer.vala:52.10-52.43: error: 1 missing arguments for `uint Gst.Bus.add_watch (int priority, owned Gst.BusFunc func)'
bus.add_watch ((int) bus_callback);
Ideally I would have wished to have that info from the get go.