GObject type names must be atleast three characters long
(https://developer.gnome.org/gobject/stable/gtype-conventions.html).
The test for delegates/bug659778.vala uses an enum name of TE, which is
too short and when compiled produces the runtime errors:
GLib-GObject-WARNING **: type name 'TE' is too short
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
and the test program does not terminate.
This has been hidden by the current test framework, testrunner.sh,
because that script adds a namespace around each test.
https://bugzilla.gnome.org/show_bug.cgi?id=786652
void do_something<G> (DoSomething<G> f) {}
-enum TE {
+enum TestEnum {
T;
public void f() {
- do_something<TE> ((x) => {
+ do_something<TestEnum> ((x) => {
switch (this) {
case T:
return T;
});
}
public void g(int i) {
- do_something<TE> ((x) => {
+ do_something<TestEnum> ((x) => {
switch (this) {
case T:
i++;
class Test {
public void f() {
- do_something<TE> (g);
+ do_something<TestEnum> (g);
do_something<int> (h);
}
[CCode (instance_pos = -1)]
- private TE g(TE i) {
+ private TestEnum g(TestEnum i) {
return i;
}
[CCode (instance_pos = -1)]
}
int main() {
- TE t = TE.T;
+ TestEnum t = TestEnum.T;
t.f ();
t.g (0);
Test t2 = new Test ();