Skip to content

Divergent behavior when indexing shadowed vars #2594

@tontyGH

Description

@tontyGH

Snippet:

/handler
 var/list/the_list = list("a", "b", "c")

/handler/proc/do_thing()
 var/static/list/the_list = list("1", "2", "3")
 
 world.log << the_list[1]

/proc/main()
 var/handler/H = new()
 H.do_thing()

OpenDream (via Sleepyhead):

Image

BYOND (via Wrench):

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    CompilerInvolves the OpenDream compilergood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions