Open
Description
Describe the Bug
See the sandbox link for examples of the cases we should cover.
We should add the check to this function:
pyrefly/pyrefly/lib/alt/function.rs
Line 166 in c247d45
The return type is calculated here:
pyrefly/pyrefly/lib/alt/function.rs
Line 376 in c247d45
Once we get the return type, we can see if we need to have 1 or 2 params based on what kind of function it is, and emit a BadFunctionDefinition error if it doesn't have the required number.
Once this task is done, add an integration test to pyrefly/lib/tests/narrow.rs, run test.py, and commit any generated changes.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response