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

emit error when proc is defined multiple times #181

Merged
merged 4 commits into from
May 8, 2020

Conversation

willox
Copy link
Contributor

@willox willox commented May 2, 2020

#179 related.

Here's the code I used for tgstation/tgstation#50812. A lot of errors for this still trigger in the TG codebase.

This is pretty much the only Rust I have ever written so you'll want to give it a careful look. The duplicate var definitions stuff I wrote is still messy so that's not here yet.

The test examples pretty much show what it does:

Code that works

/mob/proc/test()
    set SpacemanDMM_can_be_redefined = 1
    return

/mob/test()
    return

Code that errors

/mob/proc/test()
    return

/mob/test()
    return
<file>, line 4, column 10:
error: redefining proc /mob/test
- 1:15: previous definition is here

@spookydonut spookydonut merged commit 36313f0 into SpaceManiac:master May 8, 2020
@SpaceManiac SpaceManiac added this to the suite v1.5 milestone Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants