Incorrect floating reference handling when casting
The following code handles floating references incorrectly:
Gst.Bin source = Gst.parse_bin_from_description ("fakesrc name=fake ! identity", true) as Gst.Bin;
dynamic Gst.Element fake = source.get_by_name ("fake");
fake.sync = true;
Whereas this one works:
var source = Gst.parse_bin_from_description ("fakesrc name=fake ! identity", true);
dynamic Gst.Element fake = (source as Gst.Bin).get_by_name ("fake");
fake.sync = true;
And while we are at it, maybe Gst.parse_bin_from_description
should return a Gst.Bin instead of Gst.Element ?
Vala version: 0.42.2 (Ubuntu cosmic)