Skip to content

"[]" in function name breaks file parsing #458

Description

@lucasvinbr

Describe the bug
Adding a "[]" to a function name causes all errors in the file containing the function to "disappear". The error "The [name] form cannot be used" is not shown unless something is written between the brackets.

If the function with the brackets is inside a file that has been added as library, all the functions and other stuff from the file won't be read/used, apparently.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new lua file
  2. Write "function asdf[]() end"
  3. Write random text in the file and notice no errors are found

Expected behavior
An error to be shown (and all the other errors in the file, if any)

Environment (please complete the following information):

  • OS: Windows
  • Client: VSCode

Additional context
log file

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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