aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/analyser/primitive.lux10
1 files changed, 9 insertions, 1 deletions
diff --git a/new-luxc/test/test/luxc/analyser/primitive.lux b/new-luxc/test/test/luxc/analyser/primitive.lux
index 6053e2fd7..e844c194d 100644
--- a/new-luxc/test/test/luxc/analyser/primitive.lux
+++ b/new-luxc/test/test/luxc/analyser/primitive.lux
@@ -48,7 +48,6 @@
false))
)]
- ["unit" Unit #~;Unit [] (function [value] @;analyse-unit)]
["bool" Bool #~;Bool %bool% @;analyse-bool]
["nat" Nat #~;Nat %nat% @;analyse-nat]
["int" Int #~;Int %int% @;analyse-int]
@@ -58,4 +57,13 @@
["text" Text #~;Text %text% @;analyse-text]
)]
($_ seq
+ (assert (format "Can analyse unit.")
+ (|> (@common;with-unknown-type
+ @;analyse-unit)
+ (macro;run init-compiler)
+ (case> (^ (#R;Success [_type (#~;Tuple (list))]))
+ (Type/= Unit _type)
+
+ _
+ false)))
<primitives>)))