-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
"Special" intersections (such as string & {}
) are no longer order-independent since 4.8
#53043
Comments
Was looking for the dupe for like 10 minutes because I knew this had come up very recently. Felt stupid when I finally realized it was your own PR. |
Iβm pretty sure I recall Anders saying this was intentional, though #49119 doesnβt say outright. |
Ye, at the end of the day - I don't think this is a big deal. However, I actually lost like 15 minutes of my life, scratching my head why this thing doesn't work - only to realize later that I've written those two in reverse order. A general rule of thumb is that the order of the intersection shouldn't matter, right? |
This is what I thought, and I spent a bunch of time trying to make them sorted, but it does matter for overload ordering and that can affect basically anything. I can't think of any reason for it to matter for explicitly just That being said, it seems cheap to just compare them both ways. |
@ahejlsberg any specific thoughts? |
Very close to making a specific "Not sure if bug, but Andarist can certainly send a PR if interested" label... |
Too late: #52782 |
I don't feel strongly about fixing this, but the fix certainly looks fine to me. |
That said, we should of course run the full battery of tests on the fix to make sure it doesn't break anything. |
Bug Report
π Search Terms
string autocomplete catch all intersection special
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Since 4.8 the second function doesn't provide completions despite using an intersection with the same members as the first one.
π Expected behavior
I would expect both to behave the same, regardless of the order of the intersection members.
The text was updated successfully, but these errors were encountered: