From 00673f24ce975196cf1c2b01c8ca1bef8c946658 Mon Sep 17 00:00:00 2001 From: Simon Werbeck Date: Fri, 29 Mar 2013 03:12:38 +0100 Subject: [PATCH] Check parameter directions in inherited methods Fixes bug 695214. --- vala/valamethod.vala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vala/valamethod.vala b/vala/valamethod.vala index 7af50e8e8..cf02d6069 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -327,6 +327,11 @@ public class Vala.Method : Subroutine { return false; } if (!base_param.ellipsis) { + if (base_param.direction != param.direction) { + invalid_match = "incompatible direction of parameter %d".printf (param_index); + return false; + } + actual_base_type = base_param.variable_type.get_actual_type (object_type, null, this); if (!actual_base_type.equals (param.variable_type)) { invalid_match = "incompatible type of parameter %d".printf (param_index); -- 2.47.2