overloaded method that has NoReturn
for certain arguments not detected
#15861
Labels
bug
mypy got something wrong
NoReturn
for certain arguments not detected
#15861
Bug Report
If you have a method that has an overload for specific arguments that are not allowed, by having that overload return
NoReturn
, and a wider default that acceptsAny
, mypy does not detect the invalid argument.To Reproduce
Expected Behavior
I expect that the line
y + "abc"
is reported as an invalid operation.Actual Behavior
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: