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

[Feature Request] Lint again initial(thing.var), where var is a list #284

Open
Mothblocks opened this issue Sep 14, 2021 · 0 comments · May be fixed by #307
Open

[Feature Request] Lint again initial(thing.var), where var is a list #284

Mothblocks opened this issue Sep 14, 2021 · 0 comments · May be fixed by #307
Assignees

Comments

@Mothblocks
Copy link
Contributor

The following code is never correct:

/datum/species
    var/list/allowed_traits = list(1, 2, 3)

/proc/do_something(datum/species/species_type)
    if (1 in initial(species.allowed_traits))

...because lists are made on init, the initial value is always null.

@spookydonut spookydonut self-assigned this Mar 4, 2022
@spookydonut spookydonut linked a pull request Mar 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants