summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Chalice/src/main/scala/Resolver.scala3
-rw-r--r--Chalice/tests/regressions/internal-bug-3.chalice8
-rw-r--r--Chalice/tests/regressions/internal-bug-3.output.txt4
3 files changed, 15 insertions, 0 deletions
diff --git a/Chalice/src/main/scala/Resolver.scala b/Chalice/src/main/scala/Resolver.scala
index 7f5b3ecf..e802b7e7 100644
--- a/Chalice/src/main/scala/Resolver.scala
+++ b/Chalice/src/main/scala/Resolver.scala
@@ -790,6 +790,9 @@ object Resolver {
case c:Class if (c.IsNormalClass) =>
p = MonitorEpsilon(Some(exp))
p.pos = a.pos
+ case null =>
+ // ignore, found error earlier
+ p = Star
case _ =>
context.Error(a.pos, "type " + typ.FullName + " of variable " + id + " is not supported inside a rd expression.")
p = Star
diff --git a/Chalice/tests/regressions/internal-bug-3.chalice b/Chalice/tests/regressions/internal-bug-3.chalice
new file mode 100644
index 00000000..17b6dd25
--- /dev/null
+++ b/Chalice/tests/regressions/internal-bug-3.chalice
@@ -0,0 +1,8 @@
+class C
+{
+ var f: int
+ method M ()
+ requires acc(f, 100-rd(non_existing_field))
+ {
+ }
+}
diff --git a/Chalice/tests/regressions/internal-bug-3.output.txt b/Chalice/tests/regressions/internal-bug-3.output.txt
new file mode 100644
index 00000000..5f5ebd08
--- /dev/null
+++ b/Chalice/tests/regressions/internal-bug-3.output.txt
@@ -0,0 +1,4 @@
+Verification of internal-bug-3.chalice using parameters=""
+
+The program did not typecheck.
+5.28: undeclared member non_existing_field in class C