Description
Dafny version
4.1.0
Code to produce this issue
method Main() {
var a: multiset<bool> := multiset{false, true};
var b: multiset<multiset<bool>> := multiset{a[true := 0]};
print b == multiset{multiset{false}}, "\n";
}
Command to run and resulting output
$ dafny /compile:4 main.dfy
Dafny program verifier finished with 1 verified, 0 errors
Running...
false
$ dafny /compile:4 /compileTarget:js main.dfy
Dafny program verifier finished with 1 verified, 0 errors
Running...
true
What happened?
The above program verifies and compiles successfully to all backends, but the C# backend will print false
while all others will print true
(where true
would be the expected case).
What type of operating system are you experiencing the problem on?
Linux, Mac
Metadata
Metadata
Assignees
Labels
A bug in the Dafny compiler that causes a correct Dafny program to execute incorrectlyCrashes, unsoundness, incorrect output, etc. If possible, add a `part:` labelDafny's C# transpiler and its runtimeSupport for transpiling Dafny to another language. If relevant, add a `lang:` tagWill consider working on this after in progress work is done