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 673025 - Namespace resolution of default arguments when building Vapi for a Vala library
Namespace resolution of default arguments when building Vapi for a Vala library
Status: RESOLVED DUPLICATE of bug 601461
Product: vala
Classification: Core
Component: general
0.15.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-28 19:18 UTC by Eric Gregory
Modified: 2017-03-09 09:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric Gregory 2012-03-28 19:18:40 UTC
Yesterday I discovered Vapi generation for a Vala library seems to resolve namespaces inconsistently from valac when it comes to default argument types.

Consider this example:

namespace MyNamespace {

public void my_function(int a = Priority.DEFAULT) {
// ...

}

Valac will compile this function with the assumption that Priority is in the GLib namespace.

But that assumption doesn't carry over to Vapi generation; rather than changing the default argument type to GLib.Priority, Vala copies the function signature unchanged.

This, of course, gives you an error because Priority isn't defined within MyNamespace.

Let me know if you want a concrete example of this, I'll throw together a simple example if need be.
Comment 1 Rico Tzschichholz 2017-03-09 09:41:20 UTC

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