Skip to content

Commit c1e302a

Browse files
committed
Revert "parser: add error for typeof(T), suggesting typeof[T]() instead"
This reverts commit 692624b.
1 parent 692624b commit c1e302a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

vlib/v/parser/expr.v

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ fn (mut p Parser) check_expr(precedence int) !ast.Expr {
223223
}
224224
} else {
225225
p.check(.lpar)
226-
if p.tok.kind == .name && p.tok.lit.len > 0 && p.tok.lit[0].is_capital() {
227-
p.error_with_pos('use `typeof[T]()`, instead of `typeof(T)`', spos)
228-
}
229226
expr := p.expr(0)
230227
p.check(.rpar)
231228
if p.tok.kind != .dot && p.tok.line_nr == p.prev_tok.line_nr {

vlib/v/parser/tests/typeof_typename_err.out

Lines changed: 0 additions & 5 deletions
This file was deleted.

vlib/v/parser/tests/typeof_typename_err.vv

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)