diff --git a/vlib/compiler/scanner.v b/vlib/compiler/scanner.v index bdb1cea5ac..cfe6781068 100644 --- a/vlib/compiler/scanner.v +++ b/vlib/compiler/scanner.v @@ -1002,7 +1002,9 @@ fn good_type_name(s string) bool { // registration_date good // registrationdate bad fn (s &Scanner) validate_var_name(name string) { + /* if name.len > 15 && !name.contains('_') { s.error('bad variable name `$name`\n' + 'looks like you have a multi-word name without separating them with `_`' + '\nfor example, use `registration_date` instead of `registrationdate` ') } + */ } diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 6a361ec165..654ff5fc84 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -591,6 +591,9 @@ pub fn (c mut Checker) expr(node ast.Expr) table.Type { } ast.CastExpr { c.expr(it.expr) + if it.has_arg { + c.expr(it.arg) + } return it.typ } ast.CallExpr {