Skip to content

parser: rejects arr[i](args) — ElementAccessExpression as callee #589

@cs01

Description

@cs01

Bug

Parser rejects arr[i](args) — calling a function retrieved via array indexing.

const fns: Array<(x: string) => void> = [...];
fns[0]("hello");   // ← parse error: Unsupported call expression: ElementAccessExpression

Error: Unsupported call expression: ElementAccessExpression.

Impact

Together with the function-array codegen issue, blocks idiomatic dispatch-table and event-emitter patterns. Hit during lib/net.ts implementation (PR #585).

Likely fix location

src/parser/ or wherever the TS AST visitor handles CallExpression — needs to accept ElementAccessExpression as a callee alongside Identifier and PropertyAccessExpression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions