v icon indicating copy to clipboard operation
v copied to clipboard

v.gen.c: better alias handling for references/shared

Open LouisBrunner opened this issue 1 year ago • 1 comments

Fixes #17634

LouisBrunner avatar Mar 14 '23 19:03 LouisBrunner

Thanks for the fix and sorry for the delay.

There was an unrelated CI error.

There's now a slight conflict, can you fix it please?

I'll merge asap.

<<<<<<< feature/alias-fix
	if (node.expr_type.is_ptr() || unwrapped_type.is_ptr() || sym.kind == .chan)
=======
	alias_to_ptr := sym.info is ast.Alias && (sym.info as ast.Alias).parent_type.is_ptr()
	if (node.expr_type.is_ptr() || sym.kind == .chan || alias_to_ptr)
>>>>>>> master

medvednikov avatar Mar 17 '23 20:03 medvednikov

@medvednikov I think #17691 already solved the bug, so I removed that part of the code and left the extra tests

LouisBrunner avatar Mar 20 '23 15:03 LouisBrunner

Thanks, will merge once the tests pass.

medvednikov avatar Mar 20 '23 15:03 medvednikov