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
{{ message }}
Repository navigation
dict function with distinct elements handled poorly #602
No matching overload found for function `dict.__init__`
Because we match the overload:
(**kwargs: T) -> None
We instantiate T to int from the first item, then declare it incompatible with str for the second item.
This is a little unusual as most people doing that would be better off using a dictionary literal, which we do support well. Perhaps we should special case this form as dictionary initialisation too.
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
They have the same root cause. But one shows up super regularly, and one is a possibility that we could easily leave for a long period of time. We might want to solve dict with special casing.
Activity
yangdanny97 commentedon Jun 29, 2025
root cause seems to be #105
ndmitchell commentedon Jun 29, 2025
They have the same root cause. But one shows up super regularly, and one is a possibility that we could easily leave for a long period of time. We might want to solve
dictwith special casing.Add testcase for dict literal