Subclass with same type parameter name as base class installs conflicting properties
Submitted by Evan Nemerson
Link to original bug (#675267)
Description
If you have a generic subclass of a generic class where both classes have a type argument with the same name both will attempt to install the same set of GObject properties (*-type, *-dup-func, and *-destroy-func). Then, when these properties are set via the GObject API (e.g., when using GObject-style construction) in the subclass they will not be set in the base class.
class Foo<T> : Object {
public bool check_type (Type type) {
return type == typeof (T);
}
}
class Bar<T> : Foo<T> {
public Bar () {
Object ();
}
}
void main () {
Bar<string> bar = new Bar<string> ();
assert (bar.check_type (typeof (string)));
}
Edited by Rico Tzschichholz