Closed perimosocordiae closed 2 years ago
Or at least, it's not working the way I would expect it to. Reproducer:
io ::= import "io.ic" foo ::= struct { a: i64 } add ::= (x: foo, y: foo) -> foo { return foo.{ a = x.a + y.a } } (+) ::= add p := foo.{ a = 3 } q := foo.{ a = 4 } res1 := add(p, q) io.Print(res1.a) io.Print("\n") res2 := p + q io.Print(res2.a) io.Print("\n")
Observed output:
7 1
Or at least, it's not working the way I would expect it to. Reproducer:
Observed output: