summaryrefslogtreecommitdiff
path: root/Source/Dafny/Resolver.cs
diff options
context:
space:
mode:
authorGravatar Bryan Parno <parno@microsoft.com>2015-10-19 22:53:41 -0700
committerGravatar Bryan Parno <parno@microsoft.com>2015-10-19 22:53:41 -0700
commit88f5ac86bda56381f81be032a0011e34aeca50a8 (patch)
tree08cfa5f7b5d3896f9a8538291a9d584316b29daa /Source/Dafny/Resolver.cs
parentbe08f2949d674bd757a804795de1dd37c95177f3 (diff)
Improve Dafny's ability to find fueled functions by checking the function itself,
as well as the signature and body of other functions.
Diffstat (limited to 'Source/Dafny/Resolver.cs')
-rw-r--r--Source/Dafny/Resolver.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index 1798243c..6ded74d5 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -444,6 +444,13 @@ namespace Microsoft.Dafny
} else if (clbl is IteratorDecl) {
body = ((IteratorDecl)clbl).Body;
CheckForFuelAdjustments(clbl.Tok, ((IteratorDecl)clbl).Attributes, module);
+ } else if (clbl is Function) {
+ CheckForFuelAdjustments(clbl.Tok, ((Function)clbl).Attributes, module);
+ var c = new FuelAdjustment_Visitor(this);
+ var bodyExpr = ((Function)clbl).Body;
+ if (bodyExpr != null) {
+ c.Visit(bodyExpr, new FuelAdjustment_Context(module));
+ }
}
if (body != null) {
var c = new FuelAdjustment_Visitor(this);