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 634137 - Default values in constructors (at least) don't get the right namespace in the generated vapi file
Default values in constructors (at least) don't get the right namespace in th...
Status: RESOLVED DUPLICATE of bug 601461
Product: vala
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-06 00:11 UTC by Olivier Chalouhi
Modified: 2011-04-17 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Chalouhi 2010-11-06 00:11:28 UTC
for example, if a constructor has a parameter like :
using Clutter;

....

public AClass(AnimationMode anim_mode = AnimationMode.LINEAR) {
...
}

then, the generated vapi file for this library will be :

public AClass(Clutter.AnimationMode anim_mode = AnimationMode.LINEAR);

which fails because AnimationMode can't be found in the context of "AClass"

the workaround consist in writing the default value with the full namespace in vala :

public AClass(AnimationMode anim_mode = Clutter.AnimationMode.LINEAR) {
...
}

which generates the right vapi.
Comment 1 Allison Karlitskaya (desrt) 2011-04-17 17:44:36 UTC

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