Skip to content

Fold ConstraintSolver::coerceToRValue into TypeChecker::coerceToRValue() #10276

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 3 commits into from
Jun 15, 2017

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jun 15, 2017

Fold ConstraintSolver::coerceToRValue() into TypeChecker::coerceToRValue()

ConstraintSolver::coerceToRValue() missed a bunch of cases where we
should be dealing with lvalues, e.g., tuples, "try" expressions, and
so on. Extend TypeChecker::coerceToRValue() to deal with the
expression type side-tables and ConstraintSolver::coerceToRValue() to
it.

Fixes rdar://problem/32700180, a crash-on-valid.

…lue()

ConstraintSolver::coerceToRValue() missed a bunch of cases where we
should be dealing with lvalues, e.g., tuples, "try" expressions, and
so on. Extend TypeChecker::coerceToRValue() to deal with the
expression type side-tables and ConstraintSolver::coerceToRValue() to
it.

Fixes rdar://problem/32700180, a crash-on-valid.
Between syntactic restrictions and later checks for spurious '&'
expressions, we don't need to check for '&' expressions when coercing
to an rvalue. Plus, 'inout' doesn't imply 'not lvalue', so we'd never
get here.
@DougGregor DougGregor changed the title Fold ConstraintSolver::coerceToRValue into TypeChecker::coerceToMaterializeable Fold ConstraintSolver::coerceToRValue into TypeChecker::coerceToRValue() Jun 15, 2017
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit d48881b into swiftlang:master Jun 15, 2017
@DougGregor DougGregor deleted the coerce-to-rvalue branch June 15, 2017 06:45
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