8000 A `!` method on a literal passes the checker · Issue #770 · kexhq/kex · GitHub
[go: up one dir, main page]

Skip to content

A ! method on a literal passes the checker #770

Open

Description

@akoskovacs

A ! method needs a var to rewrite. On a let it is rejected with KEXET-0425, but on a literal it is not checked at all.

main do
  IO.printLine([3, 1].sort!)
end
  • kex -C: No errors found.
  • kex -R and kex (BEAM): runtime error: '!' requires a variable binding as the receiver

Expected: a check-time error like KEXET-0425 for any receiver that is not a var.

Seen on kex 0.4.0-rc.4 built from main at 371bbdf, and on 5773911. Found while writing explanations for oops.kex.run.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0