Skip to content

Commit

Permalink
Revert "parser: add error for typeof(T), suggesting typeof[T]() instead"
Browse files Browse the repository at this point in the history
This reverts commit 692624b.
  • Loading branch information
spytheman committed Jun 6, 2023
1 parent 692624b commit c1e302a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions vlib/v/parser/expr.v
Expand Up @@ -223,9 +223,6 @@ fn (mut p Parser) check_expr(precedence int) !ast.Expr {
}
} else {
p.check(.lpar)
if p.tok.kind == .name && p.tok.lit.len > 0 && p.tok.lit[0].is_capital() {
p.error_with_pos('use `typeof[T]()`, instead of `typeof(T)`', spos)
}
expr := p.expr(0)
p.check(.rpar)
if p.tok.kind != .dot && p.tok.line_nr == p.prev_tok.line_nr {
Expand Down
5 changes: 0 additions & 5 deletions vlib/v/parser/tests/typeof_typename_err.out

This file was deleted.

5 changes: 0 additions & 5 deletions vlib/v/parser/tests/typeof_typename_err.vv

This file was deleted.

0 comments on commit c1e302a

Please sign in to comment.