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 571171 - delegates as fields of structs : problems with boxing and initializers
delegates as fields of structs : problems with boxing and initializers
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Delegates
0.5.x
Other All
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-10 13:34 UTC by Abderrahim Kitouni
Modified: 2011-01-08 23:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a testcase (667 bytes, text/plain)
2009-02-10 13:35 UTC, Abderrahim Kitouni
  Details
a fix for the second issue (977 bytes, patch)
2009-02-10 13:36 UTC, Abderrahim Kitouni
committed Details | Review

Description Abderrahim Kitouni 2009-02-10 13:34:22 UTC
Please describe the problem:
assigning or calling a delegate field of a boxed structure won't compile because the target isn't referenced properly (*(*my_struct)).delegate_target instead of (*my_struct).delegate_target.

Also, when initializing the delegate field at creation, the its target isn't set.

Steps to reproduce:
I'll attach a test case.

Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Abderrahim Kitouni 2009-02-10 13:35:22 UTC
Created attachment 128371 [details]
a testcase
Comment 2 Abderrahim Kitouni 2009-02-10 13:36:17 UTC
Created attachment 128372 [details] [review]
a fix for the second issue
Comment 3 Jürg Billeter 2009-03-29 19:56:57 UTC
commit caee17cf95a94299f6f45daabfcf0e434dd21d0a
Author: Abderrahim Kitouni <a.kitouni@gmail.com>
Date:   Sun Mar 29 21:54:50 2009 +0200

    Fix initialization of delegate fields
    
    When initializing the delegate field at creation, its target was
    not set. Fixes part of bug 571171.
Comment 4 Jürg Billeter 2011-01-08 23:13:39 UTC
This appears to work fine in 0.10.2 and master.