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

checker: fix return error with multi_return optional (#16250)

This commit is contained in:
yuyi
2022-10-29 11:34:45 +08:00
committed by GitHub
parent 78c4b9a7bb
commit ee782e9119
4 changed files with 22 additions and 6 deletions

View File

@ -24,7 +24,7 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
}
if attr.starts_with('/') {
if path != '' {
return IError(http.MultiplePathAttributesError{})
return http.MultiplePathAttributesError{}
}
path = attr
x.delete(i)
@ -33,9 +33,9 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
i++
}
if x.len > 0 {
return IError(http.UnexpectedExtraAttributeError{
return http.UnexpectedExtraAttributeError{
attributes: x
})
}
}
if methods.len == 0 {
methods = [http.Method.get]