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

fix table.v

This commit is contained in:
Alexander Medvednikov 2019-10-10 00:56:33 +03:00
parent 2411b8d1e7
commit 52168d0781

View File

@ -683,15 +683,15 @@ fn (p mut Parser) check_types2(got_, expected_ string, throw bool) bool {
// throw by default // throw by default
fn (p mut Parser) check_types(got, expected string) bool { fn (p mut Parser) check_types(got, expected string) bool {
if p.first_pass() { return true } if p.first_pass() { return true }
return p._check_types(got, expected, true) return p.check_types2(got, expected, true)
} }
fn (p mut Parser) check_types_no_throw(got, expected string) bool { fn (p mut Parser) check_types_no_throw(got, expected string) bool {
return p._check_types(got, expected, false) return p.check_types2(got, expected, false)
} }
fn (p mut Parser) check_types_with_token_index(got, expected string, var_token_idx int) { fn (p mut Parser) check_types_with_token_index(got, expected string, var_token_idx int) {
if !p._check_types(got, expected, false) { if !p.check_types2(got, expected, false) {
p.error_with_token_index('expected type `$expected`, but got `$got`', var_token_idx) p.error_with_token_index('expected type `$expected`, but got `$got`', var_token_idx)
} }
} }