Hack interfaces into working with arguments

pull/1340/head
F1ssi0N 2019-07-27 13:06:36 +01:00 committed by Alexander Medvednikov
parent 26a1762156
commit 720648703b
1 changed files with 7 additions and 1 deletions

View File

@ -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 == '..' {