Generics + GObject-style construction error
Submitted by Benjamin Herr
Link to original bug (#604973)
Description
The following snippet causes gcc warnings on compilation, and then an assertion error for the GObject instance and a glibc invalid free() abort for the static string at runtime.
class Foo<G> : Object {
public G data { get; set; }
public Foo (G v) {
Object (data: v);
}
}
void main() {
new Foo<GLib.Object>(new GLib.Object()); // assertion
new Foo<string>("toot"); // invalid free()
}
Edited by Rico Tzschichholz