From 2e28c9a4d62e896a9fa238e1441bb06394453b10 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sun, 22 Aug 2021 17:09:14 +0800 Subject: [PATCH] checker: remove a duplicate check (#11265) --- vlib/v/checker/checker.v | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index cdd0aad7d7..94b8f439a0 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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)