aboutsummaryrefslogtreecommitdiff
path: root/src/testsuite/interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'src/testsuite/interpreter')
-rw-r--r--src/testsuite/interpreter/case.input5
-rw-r--r--src/testsuite/interpreter/case.spad10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/testsuite/interpreter/case.input b/src/testsuite/interpreter/case.input
new file mode 100644
index 00000000..085099d4
--- /dev/null
+++ b/src/testsuite/interpreter/case.input
@@ -0,0 +1,5 @@
+++ Contributed by Yixin Cao
+)co "case.spad"
+b:=convert("b")@Symbol
+c:=b::Syntax
+test c
diff --git a/src/testsuite/interpreter/case.spad b/src/testsuite/interpreter/case.spad
new file mode 100644
index 00000000..edbdaadd
--- /dev/null
+++ b/src/testsuite/interpreter/case.spad
@@ -0,0 +1,10 @@
+++ Contibuted by Yixin Cao
+)abbrev domain TD TestDomain
+TestDomain :Public == Private where
+ Public == with
+ test: Syntax -> Boolean
+
+ Private == add
+ test(x) ==
+ if x case Symbol then coerce(x)@Symbol
+ x case Symbol