Skip to content

Revert "AST: Early exit from subst() if the type is concrete" #6269

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
Dec 14, 2016

Conversation

slavapestov
Copy link
Contributor

This reverts commit e653e00.

This commit caused SIL verification errors with the
"buildbot,tools=RA,stdlib=RD" preset.

The root cause is that we're still not consistently setting the
recursive properties of the NameAliasType, so the early exit
in Type::subst() was falsely taken even when the underlying
type of the NameAliasType contained archetypes.

The lazy 'mapTypeOutOfContext()' applied to the underlying type
complicates matters since we can't know the recursive properties
until the alias type has been desugared for the first time.

A correct fix is to store the underlying type of a type alias as
an interface type, and set the recursive properties right away
when the type alias is deserialized; until that's done, reverting
this is an adequate workaround.

Fixes rdar://problem/29642870.

This reverts commit e653e00.

This commit caused SIL verification errors with the
"buildbot,tools=RA,stdlib=RD" preset.

The root cause is that we're still not consistently setting the
recursive properties of the NameAliasType, so the early exit
in Type::subst() was falsely taken even when the underlying
type of the NameAliasType contained archetypes.

The lazy 'mapTypeOutOfContext()' applied to the underlying type
complicates matters since we can't know the recursive properties
until the alias type has been desugared for the first time.

A correct fix is to store the underlying type of a type alias as
an interface type, and set the recursive properties right away
when the type alias is deserialized; until that's done, reverting
this is an adequate workaround.

Fixes <rdar://problem/29642870>.
@slavapestov
Copy link
Contributor Author

preset=buildbot,tools=RA,stdlib=RD
@swift-ci Please test with preset

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 066f140 into swiftlang:master Dec 14, 2016
@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test macOS with preset
Git Commit - c075bec
Test requested by - @slavapestov

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.

2 participants