OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Operator overloading is unimplemented

Open Hinaichigo opened this issue 2 years ago • 5 comments

When attempting to compile /vg/station, the following error occurs: Error at code\__HELPERS\math\vector\vector.dm:73:24: Expected end of object statement the relevant lines:

73	/vector/proc/operator+(var/vector/B)
74		return new /vector(x + B.x, y + B.y)

It seems that operator overloading isn't implemented.

Hinaichigo avatar Jun 16 '22 02:06 Hinaichigo

Fixed by #1196, though they now throw unimplemented warnings instead as they can be defined but will never be called.

amylizzle avatar Aug 17 '23 23:08 amylizzle

I would still consider that unimplemented

wixoaGit avatar Aug 17 '23 23:08 wixoaGit

@amylizzle What was the main reason that #944 couldn't be merged?

Hinaichigo avatar Oct 13 '23 03:10 Hinaichigo

Mostly because the way procs worked was refactored and I didn't want to fix the merge, but also the general approach I'd taken didn't allow for some of the operators to actually work, notably the index operators.

amylizzle avatar Oct 14 '23 08:10 amylizzle

Thanks for explaining.

Hinaichigo avatar Oct 15 '23 11:10 Hinaichigo

Closing in favor of https://github.com/OpenDreamProject/OpenDream/issues/1854 which is tracking the status of each operator overload.

ike709 avatar Jun 21 '24 19:06 ike709