Numba appears to ignore explicit type signature

When I supply this explicit type signature, I’d expect an error instead of a silent conversion to a different signature. I understand the function definition can’t satisfy the signature, but why wouldn’t a compile error be raised?

import numba
def demo():
    raise RuntimeError('')


[() → none]

1 Like

The 0.57.0 release has been giving me similar issues, making a few things a little trickier to debug. For instance I needed to migrate the way hash was implemented from overload(hash) to overload_method. In the meantime the error messages I was getting had me thinking my hash function was returning the type “none”, when in fact my hash function wasn’t even being called at all because the overload convention changed. Took a little longer than I would have liked to figure out.