mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: cleanup uneeded C code, when using selectorexpr on $if (#16802)
This commit is contained in:
parent
6229f48830
commit
c7f1db2b8a
@ -492,7 +492,7 @@ fn (mut g Gen) comptime_if_cond(cond ast.Expr, pkg_exist bool) bool {
|
||||
&& (cond.expr as ast.Ident).name == g.comptime_for_field_var && cond.field_name in ['is_mut', 'is_pub', 'is_shared', 'is_atomic', 'is_optional', 'is_array', 'is_map', 'is_chan', 'is_struct', 'is_alias'] {
|
||||
ret_bool := g.get_comptime_selector_bool_field(cond.field_name)
|
||||
g.write(ret_bool.str())
|
||||
return true
|
||||
return ret_bool
|
||||
} else {
|
||||
g.write('1')
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user