2008-07-22 Jared Moore <jaredm@svn.gnome.org>
+ * vala/valaparser.vala:
+
+ Support "global::" for object creation expressions.
+
+ * tests/namespaces.vala: add test case
+
+2008-07-22 Jared Moore <jaredm@svn.gnome.org>
+
* vapi/glib-2.0.vapi:
Fixed bindings for GLib.MainContext.check and GLib.MainContext.query,
using GLib;
+public class GlobalTestClass {
+ public GlobalTestClass() {
+ }
+}
+
namespace Maman {
+ public class GlobalTestClass {
+ public GlobalTestClass() {
+ stdout.printf("Incorrect class constructed");
+ }
+ }
+
static int main (string[] args) {
stdout.printf ("Namespace Test\n");
Bar.run ();
+ new global::GlobalTestClass();
+
return 0;
}
MemberAccess parse_member_name () throws ParseError {
var begin = get_location ();
- MemberAccess expr = null;
- do {
+ // The first member access can be global:: qualified
+ MemberAccess expr = (MemberAccess) parse_simple_name ();
+ while (accept (TokenType.DOT)) {
string id = parse_identifier ();
Gee.List<DataType> type_arg_list = parse_type_argument_list (false);
expr = new MemberAccess (expr, id, get_src (begin));
expr.add_type_argument (type_arg);
}
}
- } while (accept (TokenType.DOT));
+ }
return expr;
}