Can't instantiate an immutable class
Steps to reproduce (in terms of terminal commands)
$ cat test.vala
[Immutable]
class Foo {
int a;
public Foo(int b) { a = b; }
}
public void main () {
new Foo(1);
}
$ valac test.vala
Expected
Build succeeds without any warnings/errors
Actual
/tmp/test.vala.c: In function ‘_vala_main’:
/tmp/test.vala.c:305:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
_tmp0_ = foo_new (1);
^
Version
valac 0.40.0.247-5e72