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 591752 - Constructor: self is null
Constructor: self is null
Status: RESOLVED DUPLICATE of bug 567269
Product: vala
Classification: Core
Component: Code Generator: GObject
0.7.x
Other All
: Normal major
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-13 22:49 UTC by sanpi
Modified: 2009-08-16 21:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sanpi 2009-08-13 22:49:40 UTC
Please describe the problem:
Hi,

In certains conditions, self can be null, in the constructor.

Steps to reproduce:
public class Test : Object
{
  public string foo
  {
    get;
    construct;
  }

  public Test (string foo)
  {
    print ("%p\n", this);
    this.foo = foo;
    print ("%p\n", this);
  }
}

void main ()
{
  new Test ("mln");
}


Actual results:
0x40115d
0xc96400


Expected results:


Does this happen every time?


Other information:
The self variable is initialize after all construct properties:
Comment 1 Jürg Billeter 2009-08-16 21:04:07 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 567269 ***