OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

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

Open ike709 opened this issue 1 year ago • 0 comments

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: https://github.com/OpenDreamProject/OpenDream/pull/2064

ike709 avatar Oct 27 '24 05:10 ike709