Skip to content

Start removing typeCheckExpressionShallow() #16250

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

@slavapestov slavapestov commented Apr 30, 2018

typeCheckExpressionShallow() is used in three places:

  • Converting a Bool to an Int1
  • Calling a closure in the REPL
  • String interpolation

This PR nukes the first two.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

It's easy enough to just directly construct a well-typed
CallExpr here.
…IfStmt rewriting

Instead of spinning up a new ConstraintSystem and solving it, we can
just directly construct a call to getBuiltinLogicValue().
@slavapestov slavapestov force-pushed the start-removing-shallow-type-checking branch from 037ac59 to d466ddf Compare May 1, 2018 00:57
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@shahmishal
Copy link
Member

@swift-ci Please smoke test macOS

@slavapestov slavapestov merged commit 31db51d into swiftlang:master May 1, 2018
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