mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: access index when casting array into an array[] for pointer
This commit is contained in:
parent
f22d5c5624
commit
0a0d6536c2
@ -898,7 +898,7 @@ fn (p mut Parser) fn_call_args(f mut Fn) *Fn {
|
||||
// have to use `(array[]){ expr }` hack.
|
||||
if expected.starts_with('array_') && expected.ends_with('*') {
|
||||
p.cgen.set_placeholder(ph, '& /*111*/ (array[]){')
|
||||
p.gen('} ')
|
||||
p.gen('}[0] ')
|
||||
}
|
||||
// println('\ne:"$expected" got:"$got"')
|
||||
else if ! (expected == 'void*' && got == 'int') &&
|
||||
|
Loading…
Reference in New Issue
Block a user