From d3c778854c2dc792a2dfbd9c5b05d667d18fb4c4 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Wed, 4 Nov 2015 16:27:42 -0800 Subject: Fix issue 104. Use ResolvedExpression to compute subexpressions for DatatypeUpdateExpr if ResovedExpression is not null. --- Test/dafny4/Bug104.dfy | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Test/dafny4/Bug104.dfy (limited to 'Test/dafny4/Bug104.dfy') diff --git a/Test/dafny4/Bug104.dfy b/Test/dafny4/Bug104.dfy new file mode 100644 index 00000000..ffabbb92 --- /dev/null +++ b/Test/dafny4/Bug104.dfy @@ -0,0 +1,12 @@ +// RUN: %dafny /compile:0 "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +datatype PartRealPartGhost = PartRealPartGhost(x:int, ghost y:int) + +method UpdateField() +{ + var v := PartRealPartGhost(3, 4); + ghost var g := 5; + v := v[y := g]; + v := v.(y := g); +} \ No newline at end of file -- cgit v1.2.3