Closed perimosocordiae closed 2 years ago
Here's a short reproducer.
File 1: test_mod.ic
#{export} foo ::= struct { #{export} a: i64 } #{export} (+) ::= (x: foo, y: foo) -> foo { return foo.{ a = x.a + y.a } }
File 2: test.ic
test :: = import "test_mod.ic" f1 := test.foo.{ a = 1 } f2 := test.foo.{ a = 2 } res := f1 + f2
Error message:
Error in test.ic: No matching binary operator (+) for types `test.foo` and `test.foo`. 21 | res2 := f1 + f2
Note: if you copy-paste the contents of test_mod.ic into test.ic, then everything works as intended.
Here's a short reproducer.
File 1: test_mod.ic
File 2: test.ic
Error message:
Note: if you copy-paste the contents of test_mod.ic into test.ic, then everything works as intended.