This compiles fine.
def f(x: bool) -> bool:
return x
f('a')
How do I make it fail?
--
StackOverflow is not convinced that the question above is clear enough. So I'm writing a bit more and adding a reference to the standard library (typing).