Commit 930ed6e6 authored by Rico Tzschichholz's avatar Rico Tzschichholz

codegen: Custom abstract methods of GLib.Source are handled differently

Regression of 28b4f45b

Fixes GNOME/vala#641
parent ae0d9206
......@@ -1617,6 +1617,8 @@ public class Vala.GTypeModule : GErrorModule {
push_function (func);
bool is_gsource = cl.base_class == gsource_type;
if (cl.is_compact) {
// Add declaration, since the instance_init function is explicitly called
// by the creation methods
......@@ -1624,7 +1626,7 @@ public class Vala.GTypeModule : GErrorModule {
// connect overridden methods
foreach (Method m in cl.get_methods ()) {
if (m.base_method == null) {
if (m.base_method == null || is_gsource) {
continue;
}
var base_type = (ObjectTypeSymbol) m.base_method.parent_symbol;
......@@ -1646,7 +1648,7 @@ public class Vala.GTypeModule : GErrorModule {
// connect overridden properties
foreach (Property prop in cl.get_properties ()) {
if (prop.base_property == null) {
if (prop.base_property == null || is_gsource) {
continue;
}
var base_type = prop.base_property.parent_symbol;
......
......@@ -234,6 +234,7 @@ TESTS = \
objects/generics.vala \
objects/initially-unowned.vala \
objects/fields.vala \
objects/gsource.vala \
objects/interfaces.vala \
objects/methods.vala \
objects/paramspec.vala \
......
class FooSource : Source {
public override bool prepare (out int timeout) {
timeout = 1000;
return false;
}
public override bool check () {
return false;
}
public override bool dispatch (SourceFunc callback) {
return false;
}
}
void main () {
var foo = new FooSource ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment