ref: 0113cd12d5ce3faae500772c76018f0ad4dd776a
parent: 16b894430a5b71f4956ee305229bbbffd13605d0
author: Ori Bernstein <[email protected]>
date: Wed Oct 30 01:01:32 EDT 2019
Fix build on 9front.
diff -u a/mi/match.c b/mi/match.c
--- a/mi/match.c
+++ b/mi/match.c
@@ -208,6 +208,7 @@
default:
die("unreachable");
}
+ return 0;
}
static int
--- a/mi/Makefile.test
+++ /dev/null
@@ -1,7 +1,0 @@
-BIN=match_test
-OBJ=match.o match_test.o
-
-
-DEPS=../parse/libparse.a ../util/libutil.a
-
-include ../mk/c.mk
--- a/mi/match.c
+++ b/mi/match.c
@@ -208,6 +208,7 @@
default:
die("unreachable");
}
+ return 0;
}
static int
--- a/test/matchctup.myr
+++ /dev/null
@@ -1,32 +1,0 @@
-use std
-
-const main = {
- match (gen_a(), gen_b())
- | (`std.Err _, _): std.put("error case 1")
- | (_, `std.Err _): std.put("error case 2")
- | (`std.Ok L, `std.Ok N):
- std.put("l = {} n = {}\n", L, N)
- ;;
-}
-
-var gen_a : (-> std.result(byte[:][:], void)) = {
- var ret = [][:]
-
- for var j = 0; j < 4; ++j
- std.slpush(&ret, std.fmt("{}", j))
- ;;
-
- if 1 + 1 > 3
- -> `std.Err void
- ;;
-
- -> `std.Ok ret
-}
-
-var gen_b : (-> std.result(int, void)) = {
- if 1 + 1 > 3
- -> `std.Err void
- ;;
-
- -> `std.Ok 5
-}