1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: remove a duplicate check (#11265)

This commit is contained in:
yuyi 2021-08-22 17:09:14 +08:00 committed by GitHub
parent fde934cd93
commit 2e28c9a4d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1555,10 +1555,6 @@ pub fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type {
}
return ast.void_type
}
if left_value_sym.kind == .sum_type
&& c.table.sumtype_has_variant(left_value_type, right_type) {
return ast.void_type
}
// []T << T or []T << []T
unwrapped_right_type := c.unwrap_generic(right_type)
if c.check_types(unwrapped_right_type, left_value_type)