Skip to content

[pull] swiftwasm-release/5.3 from release/5.3 #1438

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 2 commits into from
Jul 11, 2020
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 11, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

CodaFi and others added 2 commits July 10, 2020 14:24
The Space Engine maintains as one of its invariants that the AST it is
handed must at least typecheck. When swift typechecks patterns, the only
case one is allowed to form a Boolean pattern is when a literal is
expected, and the corresponding type of the pattern clause is exactly
Bool. This precludes the use of other types, including
ExpressibleByBooleanLiteral types, from matching. Thus, this code path
was never hit. That is, until we accidentally lifted the restriction on
enum case base name overloading too early. Now, it is possible for the
space engine to see the same constructor head that has subspaces with
different argument types. The space engine is relatively tolerant of
this bizarre situation, but in this one narrow case it was not.

This patch has a narrow fix to add the missing case to the
space engine. In the long term, we need to actually finish SE-0155 which
will make this crash structurally impossible once again.

Resolves rdar://65229620
…ning

[5.3] Handle Boolean Patterns Matching Against Invalid Constructor Forms
@pull pull bot merged commit d497c32 into swiftwasm-release/5.3 Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants