diff options
author | qunyanm <unknown> | 2015-03-31 13:24:10 -0700 |
---|---|---|
committer | qunyanm <unknown> | 2015-03-31 13:24:10 -0700 |
commit | 0b953f52eb8ee07e21f4174690e5b01be572d88a (patch) | |
tree | 2cf27d12107eb750d7e73b0185dd1808a8c0bc3b /Test/dafny4/Bug62.dfy | |
parent | b4b193a05571b243d50a832dae58e837e779b710 (diff) |
Fix issue #62. Check for modifies clause and constructors in the enclosing
class when determining whether a method named Main() is the program entry.
Diffstat (limited to 'Test/dafny4/Bug62.dfy')
-rw-r--r-- | Test/dafny4/Bug62.dfy | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Test/dafny4/Bug62.dfy b/Test/dafny4/Bug62.dfy new file mode 100644 index 00000000..016ee117 --- /dev/null +++ b/Test/dafny4/Bug62.dfy @@ -0,0 +1,27 @@ +// RUN: %dafny /compile:3 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+class C {
+ constructor C() { }
+ method Main() // not Main since the enclosing class has a constructor.
+ {
+ print "hello, I'm running ... in C\n";
+ }
+}
+
+class D {
+ method Main() // not Main since it has modifies clause.
+ modifies this;
+ {
+ print "hello, I'm running ... in D\n";
+ }
+}
+
+
+class E {
+ static method Main() // not Main since it has requires clause.
+ requires true;
+ {
+ print "hello, I'm running ... in E\n";
+ }
+}
|