Skip to content

[AST] Preserve RecursiveTypeProperties::HasTypeVariable for PlaceholderType #65702

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

Closed
wants to merge 1 commit into from

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented May 5, 2023

This is a tentative fix for rdar://108947721 (and hopefully rdar://108947854), I haven't yet been able to reproduce the issue.

Make sure we preserve the "has type variables" recursive property for placeholder types to ensure we don't do permanent allocation for any type wrapping a placeholder type that has a type variable. Otherwise, we could end up deallocating the placeholder, and having another type allocated in its place.

…lderType

This is a tentative fix for rdar://108947721, I
haven't yet been able to reproduce the issue.

Make sure we preserve the "has type variables"
recursive property for placeholder types to ensure
we don't do permanent allocation for any type
wrapping a placeholder type that has a type
variable. Otherwise, we could end up deallocating
the placeholder, and having another type allocated
in its place.
@hamishknight
Copy link
Contributor Author

@swift-ci please smoke test

@hamishknight
Copy link
Contributor Author

preset=buildbot_osx_package

@swift-ci please test with preset

@hamishknight
Copy link
Contributor Author

Hmm actually this is likely to break things too, since we use hasTypeVariable in a bunch of places for other things that don't want to consider placeholders.

@hamishknight hamishknight deleted the fix-placeholder branch May 5, 2023 17:24
@hamishknight
Copy link
Contributor Author

Going to just revert instead for now #65704

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.

1 participant