From 8ee1a3fdb07906ee3858eb602c1823f9c1343b72 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Tue, 9 Feb 2016 14:24:59 -0800 Subject: Fix issue 131. Instead of crashing, report an error when an undefined member of a class is referenced. --- Test/dafny4/Bug131.dfy | 11 +++++++++++ Test/dafny4/Bug131.dfy.expect | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 Test/dafny4/Bug131.dfy create mode 100644 Test/dafny4/Bug131.dfy.expect (limited to 'Test') diff --git a/Test/dafny4/Bug131.dfy b/Test/dafny4/Bug131.dfy new file mode 100644 index 00000000..5d01cf59 --- /dev/null +++ b/Test/dafny4/Bug131.dfy @@ -0,0 +1,11 @@ +// RUN: %dafny /compile:0 "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +class Cell { + method Test(c: Cell) { + assert c.F(); + } +} + +predicate F() + diff --git a/Test/dafny4/Bug131.dfy.expect b/Test/dafny4/Bug131.dfy.expect new file mode 100644 index 00000000..b4c98652 --- /dev/null +++ b/Test/dafny4/Bug131.dfy.expect @@ -0,0 +1,2 @@ +Bug131.dfy(6,13): Error: member F does not exist in class Cell +1 resolution/type errors detected in Bug131.dfy -- cgit v1.2.3