After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780319 - fast-vapi generation fails in 0.36 with virtual methods that throw Errors
fast-vapi generation fails in 0.36 with virtual methods that throw Errors
Status: RESOLVED DUPLICATE of bug 773135
Product: vala
Classification: Core
Component: Errors
0.36.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-20 17:04 UTC by Marvin W
Modified: 2017-03-20 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marvin W 2017-03-20 17:04:36 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)
Comment 1 Marvin W 2017-03-20 17:06:05 UTC

*** This bug has been marked as a duplicate of bug 773135 ***