Skip to content

cant annotate string literal ', " #2757

@haolian9

Description

@haolian9

How are you using the lua-language-server?

NeoVim

Which OS are you using?

Linux

What is the issue affecting?

Annotations

Expected Behaviour

given this snippet, luals knows it's a single quote.

local x = "'"

but if i try to annotate it as follow,

---@type "'"
local x = "'"

luals complains: 'Cannot assign string to "".^@- string cannot match ""^@- Literal '"' cannot match string ""'

Actual Behaviour

luals does not recognize ---@type "'"

Reproduction steps

  1. Go to '...'
  2. Click '...'
  3. See error '...'

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions