From 71694474c5d59f61fb6b96ac396d30c6c43a2c73 Mon Sep 17 00:00:00 2001 From: Mark Wassell Date: Wed, 15 Jul 2020 11:22:31 +0100 Subject: Add test files missed from last commit --- test/typecheck/fail/duplicate_ctor.expect | 6 ++++++ test/typecheck/fail/duplicate_ctor.sail | 3 +++ test/typecheck/fail/duplicate_type_id.expect | 6 ++++++ test/typecheck/fail/duplicate_type_id.sail | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 test/typecheck/fail/duplicate_ctor.expect create mode 100644 test/typecheck/fail/duplicate_ctor.sail create mode 100644 test/typecheck/fail/duplicate_type_id.expect create mode 100644 test/typecheck/fail/duplicate_type_id.sail diff --git a/test/typecheck/fail/duplicate_ctor.expect b/test/typecheck/fail/duplicate_ctor.expect new file mode 100644 index 00000000..28253714 --- /dev/null +++ b/test/typecheck/fail/duplicate_ctor.expect @@ -0,0 +1,6 @@ +Type error: +[duplicate_ctor.sail]:3:15-19 +3 |union foo2 = { Bar1 : int } +  | ^--^ +  | Constructor or function already exists for Bar1 +  | diff --git a/test/typecheck/fail/duplicate_ctor.sail b/test/typecheck/fail/duplicate_ctor.sail new file mode 100644 index 00000000..44a133d3 --- /dev/null +++ b/test/typecheck/fail/duplicate_ctor.sail @@ -0,0 +1,3 @@ +union foo1 = { Bar1 : int } + +union foo2 = { Bar1 : int } \ No newline at end of file diff --git a/test/typecheck/fail/duplicate_type_id.expect b/test/typecheck/fail/duplicate_type_id.expect new file mode 100644 index 00000000..1cd2f4a8 --- /dev/null +++ b/test/typecheck/fail/duplicate_type_id.expect @@ -0,0 +1,6 @@ +Type error: +[duplicate_type_id.sail]:3:6-10 +3 |union foo1 = { Bar2 : unit } +  | ^--^ +  | Cannot create variant foo1, type name is already bound +  | diff --git a/test/typecheck/fail/duplicate_type_id.sail b/test/typecheck/fail/duplicate_type_id.sail new file mode 100644 index 00000000..fe600096 --- /dev/null +++ b/test/typecheck/fail/duplicate_type_id.sail @@ -0,0 +1,3 @@ +union foo1 = { Bar1 : unit } + +union foo1 = { Bar2 : unit } \ No newline at end of file -- cgit v1.2.3