diff options
Diffstat (limited to 'Test/dafny0/ResolutionErrors.dfy')
-rw-r--r-- | Test/dafny0/ResolutionErrors.dfy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/dafny0/ResolutionErrors.dfy b/Test/dafny0/ResolutionErrors.dfy index e5e56d03..34cfc762 100644 --- a/Test/dafny0/ResolutionErrors.dfy +++ b/Test/dafny0/ResolutionErrors.dfy @@ -309,3 +309,11 @@ method DatatypeDestructors(d: DTD_List) { var g1 := d.g; // error: cannot use ghost member in non-ghost code
}
}
+
+// ------------------- print statements ---------------------------------------
+
+method PrintOnlyNonGhosts(a: int, ghost b: int)
+{
+ print "a: ", a, "\n";
+ print "b: ", b, "\n"; // error: print statement cannot take ghosts
+}
|