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

parser: fail when assigning to _ with :=

This commit is contained in:
Enzo Baldisserri
2020-06-08 00:47:04 +02:00
committed by GitHub
parent 36edd6295f
commit 11b7b97311
41 changed files with 137 additions and 111 deletions

View File

@ -12,7 +12,7 @@ fn test_parse() {
fn test_parse_invalid() {
s := 'Invalid time string'
_ := time.parse(s) or {
time.parse(s) or {
assert true
return
}
@ -38,7 +38,7 @@ fn test_parse_rfc2822() {
fn test_parse_rfc2822_invalid() {
s3 := 'Thu 12 Foo 2019 06:07:45 +0800'
_ := time.parse_rfc2822(s3) or {
time.parse_rfc2822(s3) or {
assert true
return
}
@ -71,4 +71,4 @@ fn test_rfc8601_parse_cest() {
assert t.minute == 38
assert t.second == 6
assert t.microsecond == 15959
}
}