summaryrefslogtreecommitdiff
path: root/Util
diff options
context:
space:
mode:
authorGravatar Unknown <leino@LEINO6.redmond.corp.microsoft.com>2012-08-29 17:32:47 -0700
committerGravatar Unknown <leino@LEINO6.redmond.corp.microsoft.com>2012-08-29 17:32:47 -0700
commit4f26cc2a956771717d21285d9bb527a0602c3e0a (patch)
tree3b6cda44395b5d7a8355dcee0d7bdf00cf64d0b1 /Util
parent71a1fa551920157e02c0ea31495792ad54ab9fb8 (diff)
DafnyExtension: fixed bug (omitted case: VarDeclStmt has no Update component)
Diffstat (limited to 'Util')
-rw-r--r--Util/VS2010/DafnyExtension/DafnyExtension/IdentifierTagger.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Util/VS2010/DafnyExtension/DafnyExtension/IdentifierTagger.cs b/Util/VS2010/DafnyExtension/DafnyExtension/IdentifierTagger.cs
index 4f414b91..7aaf8944 100644
--- a/Util/VS2010/DafnyExtension/DafnyExtension/IdentifierTagger.cs
+++ b/Util/VS2010/DafnyExtension/DafnyExtension/IdentifierTagger.cs
@@ -225,7 +225,9 @@ namespace DafnyLanguage
foreach (var lhs in s.Lhss) {
IdRegion.Add(regions, lhs.Tok, lhs, true, module);
}
- if (s.Update is UpdateStmt) {
+ if (s.Update == null) {
+ // the VarDeclStmt has no associated assignment
+ } else if (s.Update is UpdateStmt) {
var upd = (UpdateStmt)s.Update;
foreach (var rhs in upd.Rhss) {
foreach (var ee in rhs.SubExpressions) {