diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-10-21 13:34:51 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-10-21 13:54:24 +0200 |
commit | 01b87299042d891d61bea9966b98e0de6d156c58 (patch) | |
tree | a112821b367e5c096fb8ccabe3ebcac3e2333e8c /tests/delegates | |
parent | 7996b74c846ad04a165630f196f4af26f7749d47 (diff) | |
download | vala-01b87299042d891d61bea9966b98e0de6d156c58.tar.gz |
vala: Really check compatiblity of error types for delegate symbol
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1242
Diffstat (limited to 'tests/delegates')
-rw-r--r-- | tests/delegates/incompatible-error-assignment.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/delegates/incompatible-error-assignment.test b/tests/delegates/incompatible-error-assignment.test new file mode 100644 index 000000000..94b5c492a --- /dev/null +++ b/tests/delegates/incompatible-error-assignment.test @@ -0,0 +1,18 @@ +Invalid Code + +errordomain FooError { + FAIL; +} + +errordomain BarError { + FAIL; +} + +delegate void FooFunc () throws FooError; + +delegate void BarFunc () throws BarError; + +void main () { + FooFunc f = () => { throw new FooError.FAIL (""); }; + BarFunc b = f; +} |