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

[if vfmt] for fgen() functions

This commit is contained in:
Alexander Medvednikov
2019-10-27 02:36:43 +03:00
parent d81b0675f0
commit d00fdca38f
4 changed files with 19 additions and 7 deletions

View File

@ -1853,9 +1853,6 @@ fn (p mut Parser) var_expr(v Var) string {
p.next()
mut typ := v.typ
// Function pointer?
//println('CALLING FN PTR')
//p.print_tok()
if typ.starts_with('fn ') && p.tok == .lpar {
T := p.table.find_type(typ)
p.gen('(')
@ -2038,7 +2035,7 @@ struct $typ.name {
exit(1)
}
p.fn_call(mut method, method_ph, '', str_typ)
// Methods returning `array` should return `array_string`
// Methods returning `array` should return `array_string` etc
if method.typ == 'array' && typ.name.starts_with('array_') {
return typ.name
}