You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow overloads in source files, not just stubs (#2603)
Fixes#1136.
- The implementation must directly follow all the overloads
- The implementation is typechecked exactly according to its own declared types
- Indicates an error if the implementation's argument list is not more general than every override variant
- Also indicates an error if the implementation's return type is also not more general than the return type of every override variant
It also limits overloads to the decorators that are specifically geared towards providing overload-type functionality -- @overload, but also @Property and its cousins @funcname.setter and @funcname.deleter. All other decorators are treated purely as decorators, and now provide redefinition errors if you repeat a function definition with them, instead of errors about an overload you probably did not mean.
0 commit comments