summaryrefslogtreecommitdiff
path: root/Source/Dafny
diff options
context:
space:
mode:
authorGravatar sboehme <unknown>2010-08-27 23:03:39 +0000
committerGravatar sboehme <unknown>2010-08-27 23:03:39 +0000
commit188df672bfa3986731693f21c8f08dcb199c98c1 (patch)
tree61c254ace71553385add5f2b4f3fbef84e00920b /Source/Dafny
parentf09bf83d24438d712021ada6fab252b0f7f11986 (diff)
Dafny: fallback to ShallowType (elements of IndexField arrays seem to have Type null)
Diffstat (limited to 'Source/Dafny')
-rw-r--r--Source/Dafny/Translator.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Dafny/Translator.cs b/Source/Dafny/Translator.cs
index bdb436ce..cd084ca1 100644
--- a/Source/Dafny/Translator.cs
+++ b/Source/Dafny/Translator.cs
@@ -3946,8 +3946,9 @@ Contract.Requires(tok != null);
args.Add(heap);
args.Add(r);
args.Add(f);
+ Bpl.Type t = (f.Type != null) ? f.Type : f.ShallowType;
return new Bpl.NAryExpr(tok,
- new Bpl.FunctionCall(new Bpl.IdentifierExpr(tok, "read", f.Type.AsCtor.Arguments[0])),
+ new Bpl.FunctionCall(new Bpl.IdentifierExpr(tok, "read", t.AsCtor.Arguments[0])),
args);
}