Skip to content

Fixed an issue with spreading a spreadable generic expression into generic JSX #51580

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

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

Andarist
Copy link
Contributor

fixes #51577

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 17, 2022
@@ -28781,7 +28781,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, /*readonly*/ false);
attributesTable = createSymbolTable();
}
const exprType = getReducedType(checkExpressionCached(attributeDecl.expression, checkMode));
const exprType = getReducedType(checkExpressionCached(attributeDecl.expression));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this aligns the logic here for the equivalent call in the checkObjectLiteral:
https://github.dev/microsoft/TypeScript/blob/4ea8ec49e8aed6601fb6b978fd08031ec058da04/src/compiler/checker.ts#L28541

note that neither of those lines were touched recently

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to see some extended suites be green and this looks reasonable to me~

@weswigham
Copy link
Member

@typescript-bot run dt
@typescript-bot test top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Heya @weswigham, I've started to run the diff-based top-repos suite on this PR at 1c00498. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 15, 2023

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at 1c00498. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@weswigham Here are the results of running the top-repos suite comparing main and refs/pull/51580/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @weswigham, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@weswigham weswigham merged commit 63495be into microsoft:main Mar 15, 2023
@jakebailey
Copy link
Member

This PR appears to have broken main via a baseline change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

spread of overloaded function rejected on generic components in JSX as of 4.7.4
4 participants