hashc
hashc copied to clipboard
Module resolution fails to lookup imported symbol
The following snippet:
fmt := import("printing");
main := () => {
y := 1 + 1 + 1 + 1;
fmt::print_int(y + t);
}
print_int
is a defined function in the printing
stdlib module:
https://github.com/hash-org/hashc/blob/1c6e3790b62ae19d2f32ebbb6760d1df855d524c/stdlib/printing.hash#L20
Instead, the symbol lookup fails:
error[0010]: cannot find member `print_int` in `printing`
--> ~/examples/main.hash:5:5
4 | y := 1 + 1 + 1 + 1;
5 | fmt::print_int(y + t);
| ^^^^^^^^^^^^^^ tried to look for member `print_int` in `printing`
6 | }