Skip to content

Start gutting ExprCleaner and friends #16234

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

Conversation

slavapestov
Copy link
Contributor

Thanks to @rudkx's work on the constraint system type map, we can actually enforce that Exprs don't get type variables stored into them.

Instead, generate the type variable in ConstraintGenerator.
However, we only want to generate it if we're type checking
from inside TypeChecker::typeCheckCompletionSequence(), so
add an isActivated() flag to CodeCompletionExpr. If it is
not set, constraint generation will simply fail on an
expression containing a CodeCompletionExpr.
@slavapestov slavapestov requested a review from rudkx April 28, 2018 05:37
@slavapestov slavapestov force-pushed the start-gutting-expr-cleaner-crap branch 2 times, most recently from 7624ca4 to 9c6477e Compare April 28, 2018 06:12
@slavapestov slavapestov force-pushed the start-gutting-expr-cleaner-crap branch from 9c6477e to c89a4a5 Compare April 28, 2018 07:12
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit f5c3a76 into swiftlang:master Apr 28, 2018
@rudkx
Copy link
Contributor

rudkx commented Apr 28, 2018

Cool, thanks! @xedin took care of the TypeLoc issues here. I had thought the last time I attempted to rip some of these save & restore type things out I hit issues with the diagnostics code, but perhaps I made some obvious mistake.

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