mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fix autocast in complex if condtions 5 (#18833)
This commit is contained in:
parent
acd581add5
commit
6a8a22891d
@ -857,6 +857,11 @@ fn (mut c Checker) autocast_in_if_conds(mut right ast.Expr, from_expr ast.Expr,
|
||||
ast.ParExpr {
|
||||
c.autocast_in_if_conds(mut right.expr, from_expr, from_type, to_type)
|
||||
}
|
||||
ast.AsCast {
|
||||
if right.typ != to_type {
|
||||
c.autocast_in_if_conds(mut right.expr, from_expr, from_type, to_type)
|
||||
}
|
||||
}
|
||||
ast.PrefixExpr {
|
||||
c.autocast_in_if_conds(mut right.right, from_expr, from_type, to_type)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user