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:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user