Open
Description
Dafny version
4.1.0
Code to produce this issue
class C {}
method Main() {
var n: C? := null;
print n, "\n";
}
Command to run and resulting output
% dafny run -t:cs src/Scratch.dfy --unicode-char:false
Dafny program verifier finished with 0 verified, 0 errors
null
% dafny run -t:cpp src/Scratch.dfy --unicode-char:false
Dafny program verifier finished with 0 verified, 0 errors
NULL
What happened?
Even better, if you print null
directly without given the null value a more precise type, you get nullptr
.
What type of operating system are you experiencing the problem on?
Mac