1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

handle unknown functions; fix var types

This commit is contained in:
Alexander Medvednikov
2020-01-01 23:15:20 +01:00
parent 0bd84e8060
commit e7e07be38c
6 changed files with 77 additions and 40 deletions

View File

@@ -63,7 +63,9 @@ fn (p mut Parser) bool_expression() string {
// `as` cast
// TODO remove copypasta
if p.tok == .key_as {
p.fspace()
p.next()
p.fspace()
cast_typ := p.get_type()
if typ == cast_typ {
p.warn('casting `$typ` to `$cast_typ` is not needed')