-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Regression - default initializer of {}
ruins type intersected with object
#49480
Comments
@typescript-bot bisect good v4.7.3 bad main |
Forgot to add |
The change between v4.7.3 and main occurred at 5aa0053. |
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of the repro in the issue body running against the nightly TypeScript. Issue body code block by @DanielRosenwasser
Historical Information
|
That’s the second time it’s done that… |
methinks the twoslasher is broken with latest TS - the bug workbench does the same thing. |
First repros on Merge list on May 27th is https://github.com/microsoft/TypeScript/pulls?q=is%3Apr+merged%3A2022-05-27+is%3Aclosed Likely introduced by #49119 |
Yup, this is caused by #49119. It modified Also, for some reason we remove object literal freshness from the source side when relating to an intersection on the target side. Lost in history as to why, removing it doesn't change any baselines. In combination, those two changes fix the issue. I will put up a PR. |
You mean the reverse, right?
|
@DanielRosenwasser Argh, yes. I always read |
GitHub now lets you do Mermaid diagrams. This should make it easier to read 😄 graph BT;
emptyObject("{}");
nonPrimitive("object");
freshEmptyObject("fresh {}");
freshEmptyObject --> nonPrimitive --> emptyObject;
|
I've never heard this term before. Also, on @ahejlsberg's note, I've personally always felt like the arrows in inheritance diagrams go in the wrong direction ( |
It's super weird because I want class arrows to go one way but subtyping arrows to go the other way. Human brains are a mess. |
The text was updated successfully, but these errors were encountered: