xfail half of Phase 3.1: static calls on `#objc_class` aliases lower to `objc_msg_send` against the class object (loaded once per module via `objc_getClass`). Test mirrors the Phase 3.0 pattern (`ffi-objc-dsl-01..04`): synthesize a class at runtime via `objc_allocateClassPair`, add class methods on the metaclass via `object_getClass(cls) + class_addMethod`, declare the sx-side `#objc_class` with `static answer :: ...` / `static add :: ...`, then invoke `SxProbeStatic.answer()` / `.add(7, 35)`. Skips on non-macOS. Surface choice: the call site is `.` (`Cls.method(args)`), matching JNI's existing static dispatch convention (`SurfaceView.new(ctx)`) rather than the plan's notional `::` form. The lowering disambiguates static vs instance by inspecting `method.is_static` on the foreign- class member, same as JNI. Picking `.` avoids extending the parser for a new postfix operator with no other use case. Pre-3.1 snapshot pins the current bail diagnostic at `lowerForeignStaticCall` (lower.zig:4475) — "static calls on 'objc_class' runtime not yet supported (Phase 3/4)" — fires twice because both the niladic and the keyword-arg static call hit it. exit=1. 164/164 tests; next commit implements the dispatch and flips the snapshot to working output.
3 lines
280 B
Plaintext
3 lines
280 B
Plaintext
/Users/agra/projects/sx/examples/ffi-objc-dsl-05-static.sx:41:14: error: static calls on 'objc_class' runtime not yet supported (Phase 3/4)
|
|
/Users/agra/projects/sx/examples/ffi-objc-dsl-05-static.sx:43:14: error: static calls on 'objc_class' runtime not yet supported (Phase 3/4)
|