hare

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

commit d51603685572153b6a17f5d4417474eb2a13be17
parent 644f8b56e34aa832194f45a717e7c57eccd51fa0
Author: Sebastian <sebastian@sebsite.pw>
Date:   Mon, 24 Oct 2022 20:29:40 -0400

haredoc: resolve symbols in root namespace

Fixes: https://todo.sr.ht/~sircmpwn/hare/555
Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcmd/haredoc/main.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/haredoc/main.ha b/cmd/haredoc/main.ha @@ -123,14 +123,14 @@ export fn main() void = { }; let decl = ""; - let dirname = if (len(id) < 2) id else id[..len(id) - 1]; + let dirname: ast::ident = if (len(id) < 2) [] else id[..len(id) - 1]; const version = match (module::lookup(&ctx, id)) { case let ver: module::version => yield ver; case let err: module::error => yield match (module::lookup(&ctx, dirname)) { case let ver: module::version => - assert(len(id) >= 2); + assert(len(id) >= 1); decl = id[len(id) - 1]; yield ver; case let err: module::error =>