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

Lint for /var/ in proc args #2064

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Oct 27, 2024

Lints for this BYOND bug: 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

This PR doesn't replicate BYOND behavior, it just adds a lint. Ref #2065 for tracking the status of replicating BYOND behavior.

Credit to @out-of-phaze for reminding me of this BYOND bug's existence.

I tested about half a dozen codebases and only found a single hit in goonstation.

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Oct 27, 2024
@ike709 ike709 requested a review from wixoaGit October 27, 2024 05:08
@ZeWaka
Copy link
Collaborator

ZeWaka commented Oct 27, 2024

fixed on goon

@wixoaGit wixoaGit merged commit bad3d7c into OpenDreamProject:master Oct 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants