Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Nov 15, 2023
1 parent 5f08d45 commit 1c238d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vlib/v/checker/comptime.v
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ fn (mut c Checker) comptime_for(mut node ast.ComptimeFor) {
unwrapped_expr_type := c.unwrap_generic(field.typ)
tsym := c.table.sym(unwrapped_expr_type)
c.table.dumps[int(unwrapped_expr_type.clear_flags(.option, .result, .atomic_f))] = tsym.cname
if tsym.kind == .array_fixed {
info := tsym.info as ast.ArrayFixed
if !info.is_fn_ret {
// for dumping fixed array we must register the fixed array struct to return from function
c.table.find_or_register_array_fixed(info.elem_type, info.size,
info.size_expr, true)
}
}
}
c.comptime_for_field_var = ''
c.inside_comptime_for_field = false
Expand Down

0 comments on commit 1c238d6

Please sign in to comment.