-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Pattern matching of tuples and Any #2028
Comments
A possible solution to this may come from ponylang/rfcs#105 |
@Theodus - I don't think this is the same issue as the one addressed by that RFRFC. |
Praetonus
pushed a commit
to Praetonus/ponyc
that referenced
this issue
Feb 3, 2018
SeanTAllen
pushed a commit
that referenced
this issue
Feb 7, 2018
dipinhora
pushed a commit
to dipinhora/ponyc
that referenced
this issue
Jun 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initially reported on the mailing list by @sgebbie.
This code used to compile under the 0.14 version but doesn't compile anymore. This comes from #1937, which made tuples be subtypes of empty interfaces like
Any
. The above type,(Any val | (None, None))
is now folded intoAny val
, and then fails to match with the tuple type because it doesn't have the right cardinality. The pattern matching code should be updated to allow empty interfaces to match with tuples of any cardinality.The text was updated successfully, but these errors were encountered: