mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
parser: fail when assigning to _ with :=
This commit is contained in:
parent
36edd6295f
commit
11b7b97311
41 changed files with 137 additions and 111 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue