compiler: access index when casting array into an array[] for pointer

pull/1742/head
Henrixounez 2019-08-24 23:21:13 +02:00 committed by Alexander Medvednikov
parent f22d5c5624
commit 0a0d6536c2
1 changed files with 1 additions and 1 deletions

View File

@ -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') &&