diff options
author | kyessenov <unknown> | 2010-08-13 22:01:50 +0000 |
---|---|---|
committer | kyessenov <unknown> | 2010-08-13 22:01:50 +0000 |
commit | 4e5e02318bfaa9ad58ccc1f6dfdb5005ce8234a8 (patch) | |
tree | ffa02abb6da569cc4eeb7b09ae2a10a139091663 /Chalice/src/Resolver.scala | |
parent | e28e0bf56556408f63d552a721e4705417e084a8 (diff) |
Chalice: add pre-conditions to specification statements; semantically spec statement is just like a call statement now
Diffstat (limited to 'Chalice/src/Resolver.scala')
-rw-r--r-- | Chalice/src/Resolver.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Chalice/src/Resolver.scala b/Chalice/src/Resolver.scala index c1740c61..360146f5 100644 --- a/Chalice/src/Resolver.scala +++ b/Chalice/src/Resolver.scala @@ -277,7 +277,8 @@ object Resolver { if (v.v != null && !s.locals.contains(v.v) && v.v.IsImmutable)
context.Error(s.pos, "Immutable variable cannot be updated by a spec statement: " + v.id);
}
- ResolveExpr(s.expr, ctx, true, true)(false)
+ ResolveExpr(s.pre, ctx, false, true)(false)
+ ResolveExpr(s.post, ctx, true, true)(false)
case s =>
ResolveStmt(s, ctx)
}
|