1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix V.js methods after the recent generics fix

This commit is contained in:
Alexander Medvednikov
2019-10-25 21:57:32 +03:00
parent 280c7d396c
commit 9c5a359de3
4 changed files with 17 additions and 8 deletions

View File

@@ -247,7 +247,9 @@ fn (table mut Table) fn_gen_name(f &Fn) string {
return name
}
fn (p mut Parser) gen_method_call(receiver &Var, receiver_type string, cgen_name string, ftyp string) string {
fn (p mut Parser) gen_method_call(receiver &Var, receiver_type string,
cgen_name string, ftyp string, method_ph int)
{
//mut cgen_name := p.table.fn_gen_name(f)
mut method_call := cgen_name + ' ('
// if receiver is key_mut or a ref (&), generate & for the first arg
@@ -270,7 +272,7 @@ fn (p mut Parser) gen_method_call(receiver &Var, receiver_type string, cgen_name
cast = '(voidptr) '
}
}
return '$cast $method_call'
p.cgen.set_placeholder(method_ph, '$cast $method_call')
}
fn (p mut Parser) gen_array_at(typ_ string, is_arr0 bool, fn_ph int) {