You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
newtype nat32 = i:int | 0 <= i < 0x80000000
datatype PhantomData<T> = PhantomData(value: T)
method Main() {
var x: nat32 := 123;
var p := PhantomData(x);
}
Output:
Dafny program verifier finished with 2 verified, 0 errors
Wrote textual form of target program to Comp.cpp
Additional target code written to Comp.h
Comp.cpp:30:34: error: use of undeclared identifier 'T'
_13_p = _module::PhantomData<T>(_12_x);
^
1 error generated.
Error while compiling C++ files. Process exited with exit code 1
The text was updated successfully, but these errors were encountered:
The C++ code generated by the following program doesn't compile.
Command:
dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp Program.dfy
Program:
Output:
The text was updated successfully, but these errors were encountered: