diff options
author | leino <unknown> | 2014-12-12 20:46:48 -0800 |
---|---|---|
committer | leino <unknown> | 2014-12-12 20:46:48 -0800 |
commit | 91c4d57eb84d5d15e011902a1da1b70131e5a222 (patch) | |
tree | 6794bafdc71f6bc31c8d09496c3435658bbfc144 /Test/dafny0/NewtypesResolution.dfy | |
parent | 62a3e97eb61cbee0d523297ccad1f2d3bcf871c3 (diff) |
Language change: All functions and methods declared lexically outside any class are now
automatically static, and fields are no longer allowed to be declared there. Stated
differently, all heap state must now be declared inside an explicitly declared class,
and functions and methods declared outside any class can be viewed as belonging to
the module. The motivating benefit of this change is to no longer need the 'static'
keyword when declaring a module of functions and methods.
Diffstat (limited to 'Test/dafny0/NewtypesResolution.dfy')
-rw-r--r-- | Test/dafny0/NewtypesResolution.dfy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Test/dafny0/NewtypesResolution.dfy b/Test/dafny0/NewtypesResolution.dfy index dbf9a175..9ae657b7 100644 --- a/Test/dafny0/NewtypesResolution.dfy +++ b/Test/dafny0/NewtypesResolution.dfy @@ -80,7 +80,7 @@ module Constraints { newtype B = x: A | x < 100
newtype C = B // the constraints 0 <= x < 100 still apply
- static predicate IsEven(x: int) // note that this is a ghost predicate
+ predicate IsEven(x: int) // note that this is a ghost predicate
{
x % 2 == 0
}
@@ -103,7 +103,7 @@ module WrongNumberOfArguments { module CyclicDependencies {
newtype Cycle = x: int | (BadLemma(); false) // error: cycle
- static lemma BadLemma()
+ lemma BadLemma()
ensures false;
{
var c: Cycle;
|