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

Allow use FP without calling it

This commit is contained in:
teggot 2019-09-01 01:40:53 +03:00 committed by Alexander Medvednikov
parent 4abfb686ec
commit c04cca1ae4

View File

@ -1649,9 +1649,10 @@ fn (p mut Parser) var_expr(v Var) string {
p.next()
mut typ := v.typ
// Function pointer?
if typ.starts_with('fn ') {
//println('CALLING FN PTR')
//p.print_tok()
//println('CALLING FN PTR')
//p.print_tok()
if typ.starts_with('fn ') && p.tok == .lpar {
T := p.table.find_type(typ)
p.gen('(')
p.fn_call_args(mut T.func)