GNOME Bugzilla – Bug 780319
fast-vapi generation fails in 0.36 with virtual methods that throw Errors
Last modified: 2017-03-20 17:06:05 UTC
This bug is a regression introduced with 0.36 (was not present in 0.34 releases, nor earlier versions I tried). When creating a fast-vapi file for parallel compilation using --fast-vapi, the compiler will error-out when a virtual/abstract method throws an error. $ cat exception.vala public class Test { public virtual void test () throws Error { throw new Error (-1, 0, "Sample error"); } } $ valac --version Vala 0.34.6 $ valac --fast-vapi exception.vapi exception.vala && echo No Error No Error $ dev/vala/compiler/valac --version Vala 0.36.0 $ dev/vala/compiler/valac --fast-vapi exception.vapi exception.vala exception.vala:2.5-2.28: error: overriding method `Test.test' is incompatible with base method `Test.test': incompatible error type `Error'. public virtual void test () throws Error { ^^^^^^^^^^^^^^^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s)
*** This bug has been marked as a duplicate of bug 773135 ***