summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2020-11-02 23:02:02 +0000
committerNadrieril2020-11-02 23:02:02 +0000
commitafd7bcf5f58f4fe07f41d15728cecb8a42b67a46 (patch)
treee4af2aabd4a07cff9af5d0e17fff4e0eeaaa81bd /dhall
parent6e4ad109e7b42eda68053c898dc7aa44199319bf (diff)
tests: add regression tests for `with` kind inference
Diffstat (limited to 'dhall')
-rw-r--r--dhall/tests/type-inference/failure/unit/WithInfersKind.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/WithInfersKind.txt6
-rw-r--r--dhall/tests/type-inference/success/unit/WithInfersKindA.dhall1
-rw-r--r--dhall/tests/type-inference/success/unit/WithInfersKindB.dhall1
4 files changed, 9 insertions, 0 deletions
diff --git a/dhall/tests/type-inference/failure/unit/WithInfersKind.dhall b/dhall/tests/type-inference/failure/unit/WithInfersKind.dhall
new file mode 100644
index 0000000..aeed835
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/WithInfersKind.dhall
@@ -0,0 +1 @@
+Some ({=} with x = Bool)
diff --git a/dhall/tests/type-inference/failure/unit/WithInfersKind.txt b/dhall/tests/type-inference/failure/unit/WithInfersKind.txt
new file mode 100644
index 0000000..1c60eb6
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/WithInfersKind.txt
@@ -0,0 +1,6 @@
+Type error: error: InvalidOptionalType
+ --> <current file>:1:1
+ |
+1 | Some ({=} with x = Bool)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ InvalidOptionalType
+ |
diff --git a/dhall/tests/type-inference/success/unit/WithInfersKindA.dhall b/dhall/tests/type-inference/success/unit/WithInfersKindA.dhall
new file mode 100644
index 0000000..4662447
--- /dev/null
+++ b/dhall/tests/type-inference/success/unit/WithInfersKindA.dhall
@@ -0,0 +1 @@
+Some ({ x = Bool } with x = 0)
diff --git a/dhall/tests/type-inference/success/unit/WithInfersKindB.dhall b/dhall/tests/type-inference/success/unit/WithInfersKindB.dhall
new file mode 100644
index 0000000..009f331
--- /dev/null
+++ b/dhall/tests/type-inference/success/unit/WithInfersKindB.dhall
@@ -0,0 +1 @@
+Optional { x : Natural }