hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 68a9198dd18bd181e61b8d1ca273f97620e83233
parent ccba718bbde9f5e01f167dd8cc6649264edc1df1
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Fri, 15 Oct 2021 10:01:23 +0000

cmd/harec: fix match case type

os::opem returns fs::error, not io::error
Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Mcmd/harec/main.ha | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmd/harec/main.ha b/cmd/harec/main.ha @@ -1,5 +1,6 @@ use bufio; use fmt; +use fs; use getopt; use hare::ast; use hare::lex; @@ -53,9 +54,9 @@ export fn main() void = { let input = match (os::open(cmd.args[i])) { case f: io::file => yield f; - case err: io::error => + case err: fs::error => fmt::fatal("Error opening {}: {}", - cmd.args[i], io::strerror(err)); + cmd.args[i], fs::strerror(err)); }; defer io::close(&input); static let buf: [os::BUFSIZ]u8 = [0...];