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

checker: check option fn returning error (fix #17423) (#17438)

This commit is contained in:
yuyi
2023-03-02 21:49:50 +08:00
committed by GitHub
parent 8f7c35552d
commit 17000ef7b6
49 changed files with 129 additions and 106 deletions

View File

@@ -53,7 +53,7 @@ fn (ver RawVersion) is_missing(typ int) bool {
return typ >= ver.raw_ints.len - 1
}
fn (raw_ver RawVersion) coerce() ?Version {
fn (raw_ver RawVersion) coerce() !Version {
ver := raw_ver.complete()
if !is_valid_number(ver.raw_ints[semver.ver_major]) {
return error('Invalid major version: ${ver.raw_ints}[ver_major]')