[Vala] Base access not working "across libraries"?



Hi all, and thank you for Vala!

I may have found a bug involving the "base" keyword.
For example:

using Vala;
public class MyVisitor:ValaParser
{
        public override void visit_source_file (SourceFile! source_file)
        {
                base.visit_source_file (source_file);
        }
}

yields:

static void my_visitor_real_visit_source_file (ValaCodeVisitor* base,
ValaSourceFile* source_file) {
        MyVisitor * self;
        self = MY_VISITOR (base);
        g_return_if_fail (source_file == NULL || VALA_IS_SOURCE_FILE
(source_file));
        vala_code_visitor_visit_source_file (VALA_CODE_VISITOR
(VALA_PARSER (self)), source_file);
}

which leads to an infinite loop.

When extending a class that is _not_ from an external vapi/library,
the code (correctly) generated is:

        VALA_CODE_VISITOR_CLASS(my_visitor_parent_class)->visit_source_file
(VALA_CODE_VISITOR (VALA_PARSER (self)), source_file);



I hope this helps,
Vlad



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]