-
Notifications
You must be signed in to change notification settings - Fork 12.8k
undefined
is acting like any
in generics extension checks
#49862
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
Your function argument |
That's expected. See Everyday Types and More on Functions from the handbook. |
This seems incredibly strange! What's the logic here? |
Since you asked for logical justification π€, the relevant logical concept is the principle of explosion - you can prove anything from a contradiction. From the point of view of the code holding a value of type |
Thanks for the thorough explanation!! |
Bug Report
π Search Terms
generic function call
π Version & Regression Information
β― Playground Link
playground link
π» Code
π Actual behavior
both implicit and explicit
undefined
arguments seems to act likeany
when used in a generic when the argument is optional. This behavior is not seen when the argument is requiredπ Expected behavior
undefined
shouldn't extend everythingThe text was updated successfully, but these errors were encountered: