summaryrefslogtreecommitdiff
path: root/Dafny/Resolver.cs
diff options
context:
space:
mode:
authorGravatar Jason Koenig <unknown>2012-07-05 17:52:22 -0700
committerGravatar Jason Koenig <unknown>2012-07-05 17:52:22 -0700
commitc40888c1f61f64acce874ae4563e3a8773e88ee2 (patch)
tree347e83e1659eb1d6d736f6013a4989585e0f89b8 /Dafny/Resolver.cs
parent38dd82d9b32230c294cf7dd973f2d964c5ecd550 (diff)
Dafny: fixed a crash in datatype argument resolution
Diffstat (limited to 'Dafny/Resolver.cs')
-rw-r--r--Dafny/Resolver.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Dafny/Resolver.cs b/Dafny/Resolver.cs
index 81d79085..04350247 100644
--- a/Dafny/Resolver.cs
+++ b/Dafny/Resolver.cs
@@ -4290,7 +4290,8 @@ namespace Microsoft.Dafny {
} else if (expr is DatatypeValue) {
var e = (DatatypeValue)expr;
// check all NON-ghost arguments
- for (int i = 0; i < e.Ctor.Formals.Count; i++) {
+ // note that if resolution is successful, then |e.Arguments| == |e.Ctor.Formals|
+ for (int i = 0; i < e.Arguments.Count; i++) {
if (!e.Ctor.Formals[i].IsGhost) {
CheckIsNonGhost(e.Arguments[i]);
}