summaryrefslogtreecommitdiff
path: root/vala/valamethodcall.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-03-22 14:13:26 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-03-22 14:59:47 +0100
commitad0530ec6d02290d1dfe8715cb2d000edc69711d (patch)
tree5936019e8563fd64620ccace4da5ff109bffe8f2 /vala/valamethodcall.vala
parentc0ff1adfb3c96c2effddadbae441ab2a81cb0751 (diff)
downloadvala-ad0530ec6d02290d1dfe8715cb2d000edc69711d.tar.gz
vala: Perform arguments-check against actual .end() method-signature
This results in error message referring to the actual expected signature. https://bugzilla.gnome.org/show_bug.cgi?id=684208
Diffstat (limited to 'vala/valamethodcall.vala')
-rw-r--r--vala/valamethodcall.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala
index f6203160c..cefc65131 100644
--- a/vala/valamethodcall.vala
+++ b/vala/valamethodcall.vala
@@ -573,6 +573,13 @@ public class Vala.MethodCall : Expression {
value_type = formal_value_type.get_actual_type (target_object_type, method_type_args, this);
}
}
+ // replace method-type if needed for proper argument-check in semantic-analyser
+ if (m != null && m.coroutine) {
+ var ma = (MemberAccess) call;
+ if (ma.member_name == "end") {
+ mtype = new MethodType (m.get_end_method ());
+ }
+ }
} else if (mtype is ObjectType) {
// constructor
var cl = (Class) ((ObjectType) mtype).type_symbol;