Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator overloading is unimplemented #732

Closed
Hinaichigo opened this issue Jun 16, 2022 · 6 comments
Closed

Operator overloading is unimplemented #732

Hinaichigo opened this issue Jun 16, 2022 · 6 comments
Labels
Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime

Comments

@Hinaichigo
Copy link
Contributor

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.

@wixoaGit wixoaGit added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels Jun 16, 2022
@amylizzle
Copy link
Contributor

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

@wixoaGit
Copy link
Member

I would still consider that unimplemented

@Hinaichigo
Copy link
Contributor Author

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

@amylizzle
Copy link
Contributor

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.

@Hinaichigo
Copy link
Contributor Author

Thanks for explaining.

@ike709
Copy link
Collaborator

ike709 commented Jun 21, 2024

Closing in favor of #1854 which is tracking the status of each operator overload.

@ike709 ike709 closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime
Projects
None yet
Development

No branches or pull requests

4 participants