-
-
Notifications
You must be signed in to change notification settings - Fork 3k
No type error when overloading with int+float #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm attempting to write a test case for this in test-overloading.test. In
but when I run
I get
I'm unsure if this error is because I wrote my test case correctly or not. |
Ah, the unit tests use minimal stubs for builtins (defined in Finally, you can use customized builtins stubs. These live in
The final line specifies which builtins to use, in this case |
Is there any documentation that explains how testing works for mypy? if there isn't where do you house development documentation? |
There's some documentation in the wiki (just expanded it a bit): http://www.mypy-lang.org/wiki/ImplementationOverview There should be more... Let me know when something is still difficult to figure out, and I'll update the docs -- and of course, anybody can update the documentation ;-) |
The line with the first call to f is accepted by the type checker, even though it should be rejected similar to the second call:
I believe that this is due to int being duck type compatible with float.
This is related to #39.
The text was updated successfully, but these errors were encountered: