Skip to content

TypeDecoder: Push one-element tuple unwrapping down into createTupleType() implementations #67565

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 1 commit into from
Jul 28, 2023

Conversation

slavapestov
Copy link
Contributor

The old behavior was only correct when building substituted types, ie, if createTupleType() was never called with a pack expansion type.

This was the case in the runtime's MetadataLookup which applies substitutions to an interface type to ultimately construct metadata for a fully-concrete type, but not in the ASTDemangler, where we actually build interface types.

Since TypeDecoder doesn't have any way to query the kind of type it just built, let's just instead make this decision inside the implementation of the type builder concept.

Fixes #67322.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

…ype() implementations

The old behavior was only correct when building substituted types,
ie, if createTupleType() was never called with a pack expansion type.

This was the case in the runtime's MetadataLookup which applies
substitutions to an interface type to ultimately construct metadata
for a fully-concrete type, but not in the ASTDemangler, where we
actually build interface types.

Since TypeDecoder doesn't have any way to query the kind of type
it just built, let's just instead make this decision inside the
implementation of the type builder concept.

Fixes swiftlang#67322.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 50b8c34 into swiftlang:main Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crash with pack expansion
1 participant