Only body of used methods are included in the type check, add a call to is_odd even without using its return value and you will see a compilation error.
TL;DR; If you don’t use the function, why the compiler would bother checking if you wrote it right?
Theoretically, tests with good code coverage might help find wrong return types… so like if you have a test for every method… and if/when we again have a working code coverage tool. (See: Code Coverage Shard for Crystal - #7 by drhuffman12)
The examples have type restrictions in the parameters so the reader think all the information is there. But parameters might not have type information, or it might not be a concrete type (eg: : Enumerable(T) vs : Array(T), or unbounded : Array).
So you need some call site to have concrete type for them.
In some places it could make sense to have a typeof(is_odd(uninitialized Int32)) as a test if you want to make sure it type checks. But is better if you have actual tests