Skip to content

Lua gate: flag --[[@as …]] right after a comma in a multi-assignment #7

Open

Description

@mareklangiewicz

Lua-side gate (luagnd / neospector style check). Not engine work.

Problem

In local a, b = x, --[[@as T]] y, stylua moves the cast comment so it no longer sits where emmylua binds it. The cast is silently lost and the type falls back to the uncast one.

Want

A gate check (in gndx gate all, NAMED and UNSCOPED like the other gates) that rejects --[[@as …]] directly after a comma in a multi-assignment, with a suggested rewrite (split the assignment, or a typed local).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions