Skip to content

Implicit function application crosses ; / newline separators (f: {x + 1}; f[2] fails) #8

Open

Description

@tangentstorm

From the Codex whole-repo review on #5 (review comment).

Location: imp-eval.mts:862 on main (6813323)

[P1] Stop implicit function application at expression separators

When a function-valued expression is followed by another statement, this check treats the separator as the start of its arguments. For example, f: {x + 1}; f[2] throws expected a noun, got: ; instead of returning 3; the equivalent newline-separated program also fails. Assignment is normalized into a set[...] expression that returns the function, so this affects ordinary multi-statement programs defining functions, not just immediately applied anonymous functions. Check for a separator before attempting implicit application and leave function-valued statements unevaluated.

Checked 2026-10-29: still present on main; not touched by open PRs #3, #4 or #7.

Activity

  1. added
    follow-upFiled from a review finding or neighboring case that belongs in its own change.
    on Oct 29, 2026
  2. added
    approvedThe human approved the issue. Workers start only on approved issues.
    on Oct 29, 2026
  3. moved this from Backlog to Pending in implishon Oct 29, 2026
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

    approvedThe human approved the issue. Workers start only on approved issues.follow-upFiled from a review finding or neighboring case that belongs in its own change.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions