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

Proc args starting with /var/ aren't treated as global vars #2065

Open
ike709 opened this issue Oct 27, 2024 · 0 comments
Open

Proc args starting with /var/ aren't treated as global vars #2065

ike709 opened this issue Oct 27, 2024 · 0 comments
Labels
Compiler Involves the OpenDream compiler Parity A difference between OpenDream and BYOND implementations

Comments

@ike709
Copy link
Collaborator

ike709 commented Oct 27, 2024

We don't currently replicate this BYOND bug report: https://www.byond.com/forum/post/2830750

The following code prints 5 in BYOND but errors with Unknown identifier "global.bar" in OpenDream.

/datum/proc/foo(/var/bar = 5)
    return

/proc/main()
    world.log << global.bar // This prints 5 in BYOND

Since this is incredibly cursed, a pragma lint has been created here: #2064

@ike709 ike709 added Compiler Involves the OpenDream compiler Parity A difference between OpenDream and BYOND implementations labels Oct 27, 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 Parity A difference between OpenDream and BYOND implementations
Projects
None yet
Development

No branches or pull requests

1 participant