From 720648703bd9743c96083bf2cee889e7f7af7a01 Mon Sep 17 00:00:00 2001 From: F1ssi0N Date: Sat, 27 Jul 2019 13:06:36 +0100 Subject: [PATCH] Hack interfaces into working with arguments --- compiler/fn.v | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/fn.v b/compiler/fn.v index 62d45c9cf5..edc8b0d719 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -888,7 +888,13 @@ fn (f &Fn) str_args(table *Table) string { // Now all methods interface_type := table.find_type(arg.typ) for method in interface_type.methods { - s += ', $method.typ (*${arg.typ}_${method.name})(void*) ' + s += ', $method.typ (*${arg.typ}_${method.name})(void*' + if method.args.len > 1 { + for a in method.args.right(1) { + s += ', $a.typ' + } + } + s += ')' } } else if arg.name == '..' {