mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: check that functions return in all if/else branches
This commit is contained in:

committed by
Alexander Medvednikov

parent
28147c0930
commit
61983a6799
@@ -36,10 +36,12 @@ fn (f mut Fetcher) fetch() {
|
||||
resp := http.get('https://hacker-news.firebaseio.com/v0/item/${id}.json') or {
|
||||
println('failed to fetch data from /v0/item/${id}.json')
|
||||
exit(1)
|
||||
return // TODO remove return
|
||||
}
|
||||
story := json.decode(Story, resp.text) or {
|
||||
println('failed to decode a story')
|
||||
exit(1)
|
||||
return // TODO remove return
|
||||
}
|
||||
f.wg.done()
|
||||
println('#$cursor) $story.title | $story.url')
|
||||
|
Reference in New Issue
Block a user