Skip to content

feat(dynamic-calls): ObjC performSelector / Dart Function.apply not implemented (Phase 6 scope reduction) #1664

Description

@carlos-alm

Context

Phase 6 (PR #1657) implemented C#/Swift/Elixir/Lua dynamic dispatch but intentionally skipped ObjC and Dart as out-of-scope. Per CLAUDE.md: file a GitHub issue and scope down rather than expanding a PR.

ObjC patterns to add to objc.ts + objc.rs

  • performSelector:withObject:unresolved-dynamic (selector is a SEL, not statically knowable)
  • [obj performSelector:@selector(greet)] → could extract greet from the @selector literal → reflection
  • objc_msgSend(obj, sel, ...)unresolved-dynamic

Dart patterns to add to dart.ts + dart.rs

  • Function.apply(fn, positionalArgs, namedArgs) → extract fn as the target
  • Mirror API (reflect(obj).invoke(Symbol('method'), args)) → reflection with keyExpr
  • dynamic typed method calls → currently handled as normal calls, could flag unknown dispatch

Priority

Low — ObjC and Dart dynamic dispatch is less common than the already-implemented patterns.
The existing fixtures for objc (PR #1629 baseline) and dart have 0% for dynamic dispatch, which is fine for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions