mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
optimize reserved type check
This commit is contained in:
parent
6d98203572
commit
6bcd0fd9cc
2 changed files with 3 additions and 2 deletions
|
@ -697,8 +697,8 @@ fn (p mut Parser) check_string() string {
|
|||
}
|
||||
|
||||
fn (p mut Parser) check_not_reserved () {
|
||||
if p.lit in Reserved_Types {
|
||||
p.error('`$p.lit` can\'t be used as name')
|
||||
if Reserved_Types[p.lit] {
|
||||
p.error('`$p.lit` can\'t be used as name')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue