Re: [Vala] How to initialize static field
- From: Jan Stępień <jan stepien cc>
- To: Pavel Stupnikov <dp dpointer org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] How to initialize static field
- Date: Sun, 22 Nov 2009 19:20:52 +0200
Pavel,
On Fri, 13 Nov 2009 12:24:36 +0300
Pavel Stupnikov <dp dpointer org> wrote:
public static class Foo: Object {
public class HashMap<string, int> bar = new HashMap<string, int>();
public static int a = 5;
}
void main () {
stdout.printf("a = %d\n",Foo.a);
stdout.printf("bar: %s\n",(Foo.bar==null?"null":"ok"));
}
Failed to compile:
$ valac --pkg=gee-1.0 t1.vala --pkg=vala-1.0
** (valac:29753): CRITICAL **: vala_ccode_function_call_add_argument:
assertion `expr != NULL' failed
/home/pavels/Projects/vala_test/t1/t1.vala.c: In function ‘_main’:
/home/pavels/Projects/vala_test/t1/t1.vala.c:94: error: expected
expression before ‘)’ token
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
It seems like a problem with the compiler. Filing a bug may be a good
idea.
Best regards,
--
Jan Stępień <jan stepien cc>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]