We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aa2afc commit d17faa6Copy full SHA for d17faa6
1 file changed
vlib/v/gen/c/cgen.v
@@ -5674,7 +5674,7 @@ fn (mut g Gen) cast_expr(node ast.CastExpr) {
5674
}
5675
} else if !node_typ_is_option && !node_typ.is_ptr() && !expr_type.is_ptr()
5676
&& ((sym.info is ast.Struct && !sym.info.is_typedef)
5677
- || (sym.kind == .alias && final_sym.kind == .struct)) {
+ || (sym.kind == .alias && final_sym.info is ast.Struct && !final_sym.info.is_typedef)) {
5678
// deprecated, replaced by Struct{...exr}
5679
styp := g.styp(node_typ)
5680
g.write('*((${styp} *)(&')
0 commit comments