[vala/wip/baedert/nullable: 1/25] method: Print encountered type if return types mismatch
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/baedert/nullable: 1/25] method: Print encountered type if return types mismatch
- Date: Tue, 8 Nov 2016 21:18:08 +0000 (UTC)
commit 64b72f3760106f427650f44dfe2e6fa76d7d59f0
Author: Timm Bäder <mail baedert org>
Date: Sat Nov 5 14:02:16 2016 +0100
method: Print encountered type if return types mismatch
If a class overrides a method of a base type, print both the encountered
return type and the return type expected by the base class.
https://bugzilla.gnome.org/show_bug.cgi?id=769501
vala/valamethod.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index ec35e00..8f8c639 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -344,7 +344,7 @@ public class Vala.Method : Subroutine, Callable {
var actual_base_type = base_method.return_type.get_actual_type (object_type,
method_type_args, this);
if (!return_type.equals (actual_base_type)) {
- invalid_match = "incompatible return type";
+ invalid_match = "Base method expected return type `%s', but `%s' was provided".printf
(actual_base_type.to_qualified_string (), return_type.to_qualified_string ());
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]