Hey y'all ![]()
Is there a way to use + on draw.Point?
So, something like this:
#lang rhombus/static
import:
draw open
operator ((a :: Point) + (b :: Point)):
Point(a.x + b.x, a.y + b.y)
def a = Point(1, 2)
def b = Point(3, 4)
a + b
If I use the above, I get this:
$ rhombus /tmp/journal/2026-08-31/test-operator-point-add.rhm
+: argument does not satisfy annotation
argument: 1
annotation: Point
context...:
/tmp/journal/2026-08-31/test-operator-point-add.rhm:6:0: +
body of "/tmp/journal/2026-08-31/test-operator-point-add.rhm"
/home/dharmatech/.local/share/racket/9.3/pkgs/rhombus-exe/rhombus/run.rhm:154:0: import_module
.../amalgam/effect.rkt:22:19
body of "/home/dharmatech/.local/share/racket/9.3/pkgs/rhombus-exe/rhombus/run.rhm"
Thanks for any suggestions!
Ed