From 9ba6c23d5c2f3f4360882886de5372c0f671647d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 8 Jul 2021 05:11:12 +0300 Subject: [PATCH] checker: casted => cast --- vlib/v/checker/checker.v | 2 +- vlib/v/checker/tests/cast_void.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 94d3e05924..b0a8bc446e 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -5115,7 +5115,7 @@ pub fn (mut c Checker) cast_expr(mut node ast.CastExpr) ast.Type { n_e_t_idx := node.expr_type.idx() expr_is_ptr := node.expr_type.is_ptr() || n_e_t_idx in ast.pointer_type_idxs if node.expr_type == ast.void_type { - c.error('expression does not return a value so it cannot be casted', node.expr.position()) + c.error('expression does not return a value so it cannot be cast', node.expr.position()) } if expr_is_ptr && to_type_sym.kind == .string && !node.in_prexpr { if node.has_arg { diff --git a/vlib/v/checker/tests/cast_void.out b/vlib/v/checker/tests/cast_void.out index 5ca6a9beca..ddd389a40f 100644 --- a/vlib/v/checker/tests/cast_void.out +++ b/vlib/v/checker/tests/cast_void.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/cast_void.vv:1:12: error: expression does not return a value so it cannot be casted +vlib/v/checker/tests/cast_void.vv:1:12: error: expression does not return a value so it cannot be cast 1 | num := int(print('')) | ~~~~~~~~~ 2 | println(num)