Skip to content

Add local types to SourceFile when type checking and not when parsing #15619

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

Conversation

slavapestov
Copy link
Contributor

Otherwise we end up adding phantom declarations that
don't get erased when we backtrack.

Fixes https://bugs.swift.org/browse/SR-7283,
rdar://problem/38913395.

Otherwise we end up adding phantom declarations that
don't get erased when we backtrack.

Fixes <https://bugs.swift.org/browse/SR-7283>,
<rdar://problem/38913395>.
@slavapestov slavapestov requested a review from DougGregor March 30, 2018 06:32
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

Ok, looks like typeCheckDecl() is too late for this.

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM! The parser really shouldn't be putting things into SourceFile

@rintaro
Copy link
Member

rintaro commented Dec 25, 2018

#21487 fixes this particular crash. But still, we really want to eliminate side-effects in Parser.

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.

3 participants