Skip to content

Conversation

@CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jul 22, 2020

After the TypeLocs were removed here, the TypeRepr from the IsExpr was
the only thing providing access to syntactic information from the parent
IsExpr. In order to support this, it was possible to construct a bizarre
ConditionalCheckedCastExpr that contained both semantic and syntactic
information. This doesn't comport with the rest of the casting nodes,
which force you to pick one or the other.

Since we're rewriting an IsExpr into a EnumIsCaseExpr, let's just stash
the syntactic information there. This unblocks a bit of cleanup.

After the TypeLocs were removed here, the TypeRepr from the IsExpr was
the only thing providing access to syntactic information from the parent
IsExpr. In order to support this, it was possible to construct a bizarre
ConditionalCheckedCastExpr that contained both semantic and syntactic
information. This doesn't comport with the rest of the casting nodes,
which force you to pick one or the other.

Since we're rewriting an IsExpr into a EnumIsCaseExpr, let's just stash
the syntactic information there. This unblocks a bit of cleanup.
@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 22, 2020

@swift-ci smoke test and merge

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 22, 2020

@swift-ci smoke test macOS platform

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 22, 2020

@CodaFi CodaFi merged commit 2a6bad2 into swiftlang:master Jul 22, 2020
@CodaFi CodaFi deleted the casting-call branch July 22, 2020 22:18
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