After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590200 - declaring virtual signals results in compile error
declaring virtual signals results in compile error
Status: RESOLVED DUPLICATE of bug 571685
Product: vala
Classification: Core
Component: Code Generator
0.7.x
Other All
: Normal normal
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-29 23:43 UTC by Jim Nelson
Modified: 2009-08-01 15:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jim Nelson 2009-07-29 23:43:09 UTC
Please describe the problem:
Trying to declare a virtual signal in a class so a subclass may override it:

public class Xyzzy : Object {
    public virtual signal void notify();
}

public class Fubar : Xyzzy {
    public override void notify() {
        message("override");
    }
}

void main() {
    Fubar f = new Fubar();
    f.notify();
}

The C compiler generates this error for this code:

valac --save-temps test.vala -o test
/home/jim/prj/test/test.c: In function ‘fubar_class_init’:
/home/jim/prj/test/test.c:107: error: ‘XyzzyClass’ has no member named ‘notify’
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)

I'm using valac 0.7.4.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Jürg Billeter 2009-08-01 15:37:04 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.


*** This bug has been marked as a duplicate of 571685 ***