Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 24, 2025
1 parent 5aab6ac commit 66a887b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -4347,17 +4347,20 @@ fn (mut g Gen) debugger_stmt(node ast.DebuggerStmt) {
cast_sym := g.table.sym(var_typ)

mut param_var := strings.new_builder(50)
is_option := obj.typ.has_flag(.option)
is_option := obj.orig_type.has_flag(.option)
var_typ_is_option := var_typ.has_flag(.option)
if obj.smartcasts.len > 0 {
is_option_unwrap := is_option && var_typ == obj.typ.clear_flag(.option)
is_option_unwrap := is_option && !obj.typ.has_flag(.option)
&& obj.orig_type.has_flag(.option)
mut opt_cast := false
mut func := if cast_sym.info is ast.Aggregate {
''
} else {
g.get_str_fn(var_typ)
}

if obj.smartcasts.len > 1 && obj_sym.kind == .sum_type {
param_var.write_string('*(')
}
param_var.write_string('(')
if obj_sym.kind == .sum_type && !obj.is_auto_heap {
if is_option {
Expand Down

0 comments on commit 66a887b

Please sign in to comment.