GLib.Variant deep_unpack shows odd results when unpacking "(v)"
See the following example:
const {GLib} = imports.gi;
/* The following won't work... */
const variant = new GLib.Variant('(v)', [new GLib.Variant('x', 2)]);
print(variant);
print(variant instanceof GLib.Variant)
const value = variant.deep_unpack();
print(value);
print(value instanceof GLib.Variant);
/* BUT, this works... */
print(variant.get_child_value(0).get_variant().get_int64())
The output is:
[object variant of type "(v)"]
true
[object variant of type "x"]
false
2
The third print suggests value
is a GLib.Variant, but the fourth print shows it is not, and effectively you can't access any method from GLib.variant.
The fifth print shows how the real value can be accessed without deep_unpack.