GNOME Bugzilla – Bug 673025
Namespace resolution of default arguments when building Vapi for a Vala library
Last modified: 2017-03-09 09:41:20 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.
*** This bug has been marked as a duplicate of bug 601461 ***