summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/typecheck/pass/bool_constraint/v1.expect4
-rw-r--r--test/typecheck/pass/global_type_var/v1.expect10
-rw-r--r--test/typecheck/pass/global_type_var/v2.expect10
-rw-r--r--test/typecheck/pass/if_infer/v1.expect4
-rw-r--r--test/typecheck/pass/if_infer/v2.expect4
-rw-r--r--test/typecheck/pass/true_false.sail11
6 files changed, 27 insertions, 16 deletions
diff --git a/test/typecheck/pass/bool_constraint/v1.expect b/test/typecheck/pass/bool_constraint/v1.expect
index 3e2c7bde..2ce8f471 100644
--- a/test/typecheck/pass/bool_constraint/v1.expect
+++ b/test/typecheck/pass/bool_constraint/v1.expect
@@ -6,7 +6,7 @@ Tried performing type coercion from int(4) to {'m, ('b & 'm == 'n | not('b) & 'm
Coercion failed because:
int(4) is not a subtype of {('m : Int), (('b & 'm == 'n) | (not('b) & 'm == 3)). int('m)}
in context
- * 4 == 'ex41#m
+ * 4 == 'ex44#m
* not('b)
where
* 'b bound at file "bool_constraint/v1.sail", line 11, character 1 to line 13, character 1
@@ -15,7 +15,7 @@ Coercion failed because:
 if b then n else 4
}
- * 'ex41#m bound at file "bool_constraint/v1.sail", line 12, character 20 to line 12, character 20
+ * 'ex44#m bound at file "bool_constraint/v1.sail", line 12, character 20 to line 12, character 20
if b then n else 4
diff --git a/test/typecheck/pass/global_type_var/v1.expect b/test/typecheck/pass/global_type_var/v1.expect
index e81c467e..1b159c6c 100644
--- a/test/typecheck/pass/global_type_var/v1.expect
+++ b/test/typecheck/pass/global_type_var/v1.expect
@@ -6,15 +6,15 @@ Tried performing type coercion from int(32) to int('size) on 32
Coercion failed because:
int(32) is not a subtype of int('size)
in context
- * 'size == 'ex14#
- * ('ex14# == 32 | 'ex14# == 64)
- * ('ex13# == 32 | 'ex13# == 64)
+ * 'size == 'ex11#
+ * ('ex11# == 32 | 'ex11# == 64)
+ * ('ex10# == 32 | 'ex10# == 64)
where
- * 'ex13# bound at file "global_type_var/v1.sail", line 5, character 5 to line 5, character 32
+ * 'ex10# bound at file "global_type_var/v1.sail", line 5, character 5 to line 5, character 32
let (size as 'size) : {|32, 64|} = 32
- * 'ex14# bound at file "global_type_var/v1.sail", line 5, character 6 to line 5, character 18
+ * 'ex11# bound at file "global_type_var/v1.sail", line 5, character 6 to line 5, character 18
let (size as 'size) : {|32, 64|} = 32
diff --git a/test/typecheck/pass/global_type_var/v2.expect b/test/typecheck/pass/global_type_var/v2.expect
index 21c4b348..1fee46c8 100644
--- a/test/typecheck/pass/global_type_var/v2.expect
+++ b/test/typecheck/pass/global_type_var/v2.expect
@@ -6,15 +6,15 @@ Tried performing type coercion from int(64) to int('size) on 64
Coercion failed because:
int(64) is not a subtype of int('size)
in context
- * 'size == 'ex14#
- * ('ex14# == 32 | 'ex14# == 64)
- * ('ex13# == 32 | 'ex13# == 64)
+ * 'size == 'ex11#
+ * ('ex11# == 32 | 'ex11# == 64)
+ * ('ex10# == 32 | 'ex10# == 64)
where
- * 'ex13# bound at file "global_type_var/v2.sail", line 5, character 5 to line 5, character 32
+ * 'ex10# bound at file "global_type_var/v2.sail", line 5, character 5 to line 5, character 32
let (size as 'size) : {|32, 64|} = 32
- * 'ex14# bound at file "global_type_var/v2.sail", line 5, character 6 to line 5, character 18
+ * 'ex11# bound at file "global_type_var/v2.sail", line 5, character 6 to line 5, character 18
let (size as 'size) : {|32, 64|} = 32
diff --git a/test/typecheck/pass/if_infer/v1.expect b/test/typecheck/pass/if_infer/v1.expect
index 95073799..55b39716 100644
--- a/test/typecheck/pass/if_infer/v1.expect
+++ b/test/typecheck/pass/if_infer/v1.expect
@@ -4,13 +4,13 @@ Type error at file "if_infer/v1.sail", line 10, character 11 to line 10, charact
No overloadings for vector_access, tried:
bitvector_access:
- Could not resolve quantifiers for bitvector_access (0 <= 'ex42#ex41# & ('ex42#ex41# + 1) <= 3)
+ Could not resolve quantifiers for bitvector_access (0 <= 'ex44#ex43# & ('ex44#ex43# + 1) <= 3)
Try adding named type variables for
plain_vector_access:
- Could not resolve quantifiers for plain_vector_access (0 <= 'ex45#ex44# & ('ex45#ex44# + 1) <= 3)
+ Could not resolve quantifiers for plain_vector_access (0 <= 'ex47#ex46# & ('ex47#ex46# + 1) <= 3)
Try adding named type variables for
diff --git a/test/typecheck/pass/if_infer/v2.expect b/test/typecheck/pass/if_infer/v2.expect
index afa04343..3518448d 100644
--- a/test/typecheck/pass/if_infer/v2.expect
+++ b/test/typecheck/pass/if_infer/v2.expect
@@ -4,13 +4,13 @@ Type error at file "if_infer/v2.sail", line 10, character 11 to line 10, charact
No overloadings for vector_access, tried:
bitvector_access:
- Could not resolve quantifiers for bitvector_access (0 <= 'ex42#ex41# & ('ex42#ex41# + 1) <= 4)
+ Could not resolve quantifiers for bitvector_access (0 <= 'ex44#ex43# & ('ex44#ex43# + 1) <= 4)
Try adding named type variables for
plain_vector_access:
- Could not resolve quantifiers for plain_vector_access (0 <= 'ex45#ex44# & ('ex45#ex44# + 1) <= 4)
+ Could not resolve quantifiers for plain_vector_access (0 <= 'ex47#ex46# & ('ex47#ex46# + 1) <= 4)
Try adding named type variables for
diff --git a/test/typecheck/pass/true_false.sail b/test/typecheck/pass/true_false.sail
new file mode 100644
index 00000000..42b175d8
--- /dev/null
+++ b/test/typecheck/pass/true_false.sail
@@ -0,0 +1,11 @@
+default Order dec
+
+$include <prelude.sail>
+
+function main((): unit) -> unit = {
+ let x: bool(false) = false;
+ let y: bool(true) = true;
+ _check(x : bool);
+ _check(x : bool(false));
+ _not_check(x : bool(true))
+}