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

@ -407,6 +407,8 @@ fn (mut m map) get_and_set(key string, zero voidptr) voidptr {
// Key not found, insert key with zero-value
m.set(key, zero)
}
assert false
return voidptr(0)
}
// If `key` matches the key of an element in the container,