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 604726 - default method parameters reference "self" incorrectly
default method parameters reference "self" incorrectly
Status: RESOLVED DUPLICATE of bug 531428
Product: vala
Classification: Core
Component: Methods
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-16 14:13 UTC by Ilya Mezhirov
Modified: 2009-12-19 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ilya Mezhirov 2009-12-16 14:13:04 UTC
In the code below, the foo() call is compiled as this:
   foo_foo (_tmp0_ = foo_new (), self->priv->n);
but "self" should actually mean _tmp0_ here.

Compilation of the code below results in:
...
/home/ilya/my/prog/vala/try-array.vala.c:227: error: ‘self’ undeclared (first use in this function)
...
--------------------------
class Foo
{
    int n = 42;
    public void foo(int i = n)
    {
    }
}

void main()
{
    new Foo().foo();
}
Comment 1 Jürg Billeter 2009-12-19 12:42:05 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

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