For this minimal example
@overload
def test(val: int) -> int: ...
@overload
def test(val: str) -> str: ...
def test(val):
return val
with --disallow-untyped-defs mypy fails with error: Function is missing a type annotation
but without it it succeeds.