Skip to content

Commit

Permalink
Add test for issue #2726
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelMayer committed Nov 1, 2022
1 parent f4bac32 commit cc2fb2e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Test/git-issues/git-issue-2726.dfy
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// RUN: %dafny_0 /compile:1 /compileTarget:cs "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

datatype Formula =
| And(left: Formula, right: Formula)
| Not(underlying: Formula)
| True
{
function method size(): nat {
match this
case And(l, r) => l.size() + r.size()
case Not(u) => u.size() + 1
case True => 1
}
}
Empty file.

0 comments on commit cc2fb2e

Please sign in to comment.