errordomain methods ignored or generate non-compiling c code
Submitted by Pavel Stupnikov
Link to original bug (#688601)
Description
There is not much documentation on errordomains, but somewhere I've read that they are quite similar to enums. So I've tried to write something like
public errordomain TestError {
FOO;
public static string to_string() {
return "Foo";
}
public static TestError create(string msg) {
return new TestError.FOO(msg);
}
}
But this is not working. Vala completely ignores to_string method, so attempt to use it results it compilation error. And for create method vala generates declaration in c code, but no definition, so it fails on linking (undefined reference to `test_error_create')
Version: 0.18.x