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

Đang mở
#8 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@tangentstorm đang làm issue này rồi.

Từ ngày 29/10/2026.

  • #12 của @tangentstorm — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
compilers

Hướng nghiên cứu

Read imp-eval.mts around line 862 and run the reported semicolon-separated example, then check the equivalent newline-separated program. Done means both programs return 3 without treating the separator as an argument; note that linked PR #12 is already open.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

approved follow-up

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.

Ngôn ngữ chính
TypeScript
Star
6
Fork
1
Merge trung bình
3 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tangentcode/implish

Tất cả issue của tangentcode/implish

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.