summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mono_reduce.sml2
-rw-r--r--tests/pb.ur7
-rw-r--r--tests/pb.urs1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml
index f1a6758d..50553560 100644
--- a/src/mono_reduce.sml
+++ b/src/mono_reduce.sml
@@ -685,7 +685,7 @@ fun reduce (file : file) =
map (fn (p, (EAbs (_, _, _, e), _)) =>
(p, swapExpVarsPat (0, patBinds p) e)
| (p, (EError (e, (TFun (_, t), _)), loc)) =>
- (p, (EError (e, t), loc))
+ (p, (EError (liftExpInExp (patBinds p) e, t), loc))
| (p, e) =>
(p, (EApp (liftExpInExp (patBinds p) e,
(ERel (patBinds p), loc)), loc)))
diff --git a/tests/pb.ur b/tests/pb.ur
new file mode 100644
index 00000000..e6e5bd5c
--- /dev/null
+++ b/tests/pb.ur
@@ -0,0 +1,7 @@
+fun api_1 (pb:postBody) (nm:string) : transaction page =
+ return <xml>Processing the request</xml>
+
+fun api (pb:postBody) (v:int) (nm:string) : transaction page =
+ case v of
+ 1 => api_1 pb nm
+ | _ => error <xml>Version {[v]} is not supported</xml>
diff --git a/tests/pb.urs b/tests/pb.urs
new file mode 100644
index 00000000..9def0871
--- /dev/null
+++ b/tests/pb.urs
@@ -0,0 +1 @@
+val api : postBody -> int -> string -> transaction page