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 648030 - vala allows less accessible constants as defaults
vala allows less accessible constants as defaults
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Semantic Analyzer
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-17 17:47 UTC by Allison Karlitskaya (desrt)
Modified: 2016-10-06 18:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check accessibility of default arguments (12.21 KB, patch)
2016-10-02 10:57 UTC, Simon Werbeck
committed Details | Review

Description Allison Karlitskaya (desrt) 2011-04-17 17:47:02 UTC
Maybe related to bug 601461.

vala in:

const int SOME_CONST = 1;

public void function (int x = SOME_CONST) { }


vapi out:

[CCode (cheader_filename = "x.h")]
public static void function (int x = SOME_CONST);


result:

x.vapi:4.38-4.47: error: The name `SOME_CONST' does not exist in the context of `function'
public static void function (int x = SOME_CONST);
                                     ^^^^^^^^^^
Comment 1 Allison Karlitskaya (desrt) 2012-01-19 02:55:31 UTC
problem still exists, as described, in 0.15
Comment 2 Simon Werbeck 2016-10-02 10:57:16 UTC
Created attachment 336757 [details] [review]
Check accessibility of default arguments
Comment 3 Rico Tzschichholz 2016-10-06 18:38:08 UTC
commit 78588e6cf96a6f239840f728aedc2ecf5aabf7de
Author: Simon Werbeck <simon.werbeck@gmail.com>
Date:   Sun Oct 2 00:20:59 2016 +0200

    vala: Check accessibility of default arguments