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

checker: check that fns with return values, and matches, do return

This commit is contained in:
Delyan Angelov
2020-11-11 17:23:57 +02:00
parent 6271798ce3
commit 8c241cb745
6 changed files with 55 additions and 19 deletions

View File

@@ -325,6 +325,9 @@ fn (mut ch Channel) try_push_priv(src voidptr, no_block bool) ChanState {
}
}
}
// this should not happen
assert false
return .success
}
[inline]
@@ -494,8 +497,9 @@ fn (mut ch Channel) try_pop_priv(dest voidptr, no_block bool) ChanState {
dest2 = dest
}
}
return .success
break
}
return .success
}
// Wait `timeout` on any of `channels[i]` until one of them can push (`is_push[i] = true`) or pop (`is_push[i] = false`)