diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/typecheck/fail/and_let_bool.expect | 13 | ||||
| -rw-r--r-- | test/typecheck/fail/and_let_bool.sail | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/typecheck/fail/and_let_bool.expect b/test/typecheck/fail/and_let_bool.expect new file mode 100644 index 00000000..5ab1e377 --- /dev/null +++ b/test/typecheck/fail/and_let_bool.expect @@ -0,0 +1,13 @@ +Type error: +[[96mand_let_bool.sail[0m]:6:11-42 +6[96m |[0m and_bool(let y : bool = x in not_bool(y), x) + [91m |[0m [91m^-----------------------------^[0m + [91m |[0m The type variable 'ex14# would leak into an outer scope. + [91m |[0m + [91m |[0m Try adding a type annotation to this expression. + [91m |[0m This error was caused by: + [91m |[0m [[96mand_let_bool.sail[0m]:6:15-16 + [91m |[0m 6[96m |[0m and_bool(let y : bool = x in not_bool(y), x) + [91m |[0m [91m |[0m [91m^[0m + [91m |[0m [91m |[0m Type variable 'ex14# was introduced here + [91m |[0m diff --git a/test/typecheck/fail/and_let_bool.sail b/test/typecheck/fail/and_let_bool.sail new file mode 100644 index 00000000..152cb355 --- /dev/null +++ b/test/typecheck/fail/and_let_bool.sail @@ -0,0 +1,6 @@ +default Order dec + +$include <flow.sail> + +function test(x) : bool -> bool = + and_bool(let y : bool = x in not_bool(y), x) |
