We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb3013 commit 3ab8ca6Copy full SHA for 3ab8ca6
1 file changed
vlib/v2/types/checker.v
@@ -677,7 +677,7 @@ fn (mut c Checker) expr_impl(expr ast.Expr) Type {
677
}
678
// sum type, check variants
679
if (expected_type is SumType && elem_type !in expected_type.variants)
680
- && !c.check_types(first_elem_type, elem_type) // everything else {
+ && !c.check_types(first_elem_type, elem_type) { // everything else
681
// TODO: add general method for promotion/coercion
682
c.error_with_pos('expecting element of type: ${first_elem_type.name()}, got ${elem_type.name()}',
683
expr.pos)
0 commit comments