-
Notifications
You must be signed in to change notification settings - Fork 256
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
Ordered, nested matching of datatypes and constants #458
Conversation
…to adapt CompileMatchCaseStmt
…asePatterns and construct MatchCase (with Arguments) instead of CasePatterns
…esolve on smolpatoverlap
…o more testing. Also, investigate weird printing without rprint option
…out). MultipleMatching(tuple) not implemented. Constant matching not implemented
…nchExpr, will change its return type and do this
…BranchStatement, will make it work on RBranchExpr tomorrow
…branch in branches, which may happen on malformed input
…bug report dafny-lang#369 and related (throw an error on Bar(Bar) if Bar(value:Foo), but desugar if Bar(value:int))
…in [3]. Leaving a bit of debug code in while I perform most testing
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I'll have a closer look at this over the weekend, the second issue (with git-issue-495 and ResolutionErrors) is due to how the selector's token (used when generating fresh variables in the PM compiler) is overwritten by the RBranch's token when let-bound in that branch. I should be able to get better error location by overwriting these token earlier.
This is unrelated to the PR, but I will update the error messages in Translator.cs
This example gets desugared to match d {
Fixed (and added as test case in PatternMatching.dfy), thank you! |
… patterns instead of of branches)
…Container stands for a location from the source file.
…anup and update translator
… error message for missing cases in constant matching
…eContext part of mti
…of tuples and of desugared match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the latest commits. Thank you for the changes!
I'm thinking the only remaining issue is getting the tests to all pass (StateMonad.dfy is failing).
Added support for ordered, nested matching of datatypes and constants.