From 2e49a4bb7b9b20e44285dbd34dad681fe163bbf7 Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Thu, 11 Jan 2024 13:01:57 -0500 Subject: [PATCH] [test] Add more tests for match errors on variants --- test/variants/seman/match_err05.v3 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/variants/seman/match_err05.v3 diff --git a/test/variants/seman/match_err05.v3 b/test/variants/seman/match_err05.v3 new file mode 100644 index 000000000..e44235b69 --- /dev/null +++ b/test/variants/seman/match_err05.v3 @@ -0,0 +1,11 @@ +//@seman = MatchError @ 9:17 +type X { + case A(y: int); + case B(y: int); +} +def foo(x: Y) -> int { + match (x) { + A(y) => return y; + C(y) => return y; + } +}