Skip to content

Conversation

@spookydonut
Copy link
Collaborator

Closes #284

Copy link
Owner

@SpaceManiac SpaceManiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Error message should be more descriptive about what the issue is. Along the lines of:
    initial() called on var/list/{}, but it always returns null for lists
  2. The for loop here will give redundant errors if you write initial(a.b.c.d). Should probably just pull .last().
  3. It might make sense to apply this to anything that isn't a primitve, rather than lists, because new /obj likewise returns null from initial().
  4. Could go either way on this but it might make sense to analyze the actual initial values of that variable for subtypes to see if they are non-primitives, rather than just the static types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants