Strange behavior in GObject.param_values_cmp and GObject.param_value_validate
See the example below:
const {GObject, Gtk} = imports.gi;
Gtk.init(null);
const w = new Gtk.Box();
const pspec = GObject.Object.find_property.call(w.constructor.$gtype, 'visible');
print(pspec);
print(pspec.default_value);
print(GObject.param_value_validate(pspec, pspec.default_value)); // false, which is not correct
print(GObject.param_values_cmp(pspec, pspec.default_value, true)); // -1 , which is correct
print(GObject.param_values_cmp(pspec, pspec.default_value, false)); // 0, which is correct
print(GObject.param_values_cmp(pspec, pspec.default_value, 'true')); // 0, which is not correct
GObject.param_values_cmp
will behave strangely if the given values types are not strictly the same type as the one defined in the pspec. E.g. in the code above, false (boolean) returns zero, but 'true' (string) also returns zero.
Even if I try to mix it with GObject.param_value_validate
, this function always return 'false', even for the pspec default value.