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:
parent
4abfb686ec
commit
c04cca1ae4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user