8000 A method call on an unannotated parameter is not checked at the call site · Issue #782 · kexhq/kex · GitHub
[go: up one dir, main page]

Skip to content

A method call on an unannotated parameter is not checked at the call site #782

Open

Description

@akoskovacs

With no annotation on x, x.frobnicate checks clean. The call describe(1) is then not checked against what describe does with its argument, and both backends fail at run time.

let describe(x) = x.frobnicate

main do
  IO.printLine(describe(1))
end
  • kex -C: No errors found.
  • kex -R and kex (BEAM): runtime error: undefined method: frobnicate for Integer

With x: Integer the same body gives KEXET-0101. Expected: either the definition rejected because no type has frobnicate, or the call rejected because Integer does not. Possibly related to #643 (an untyped argument resolved by guess).

Seen on kex 0.4.0-rc.4 built from main at 371bbdf. 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