Disable constraint reduction in intersections created by constraint hoisting#58403
Disable constraint reduction in intersections created by constraint hoisting#58403ahejlsberg merged 4 commits intomainfrom
Conversation
|
@typescript-bot test it |
|
Hey @ahejlsberg, the results of running the DT tests are ready. Everything looks the same! |
|
@ahejlsberg Here are the results of running the user tests comparing Everything looks good! |
|
@ahejlsberg Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@ahejlsberg Here are the results of running the top 400 repos comparing Everything looks good! |
|
Tests and performance all look good. This is ready to review and merge. |
| // Also, unlike union types, the order of the constituent types is preserved in order that overload resolution | ||
| // for intersections of types with signatures can be deterministic. | ||
| function getIntersectionType(types: readonly Type[], aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[], noSupertypeReduction?: boolean): Type { | ||
| function getIntersectionType(types: readonly Type[], flags = IntersectionFlags.None, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[]): Type { |
There was a problem hiding this comment.
Is this flag something that should be required, in case we forget to pass it? Happens all the time for the relation intersection state...
There was a problem hiding this comment.
No, it's exceedingly rare to need any of these flags (only one place for each flag in entire code base), so I think it's preferable to leave it optional.
Fixes #58370.