ffi 1.28 backfill: locked-in test for #objc_call(bool)
Closes the runtime-verification gap from cluster 1.28: chess startup doesn't reach the keyboard `becomeFirstResponder` / `resignFirstResponder` path, so `#objc_call(bool)` was only compile-verified. This example installs two BOOL-returning IMPs via `class_addMethod` (type encoding "B@:") and dispatches both through `#objc_call(bool)`. Also exercises the nil-receiver guarantee (libobjc returns a zero slot, which decodes as false). This is a test-add commit (per the FFI cadence rule): it locks in current behavior without changing any lowering. Lowering shape is identical to `#objc_call(u8)` at the ABI layer; this test makes the source-level type explicit and gives `git bisect` a target if a future emit_llvm change inadvertently breaks single-byte returns. 110/110 host tests pass.
This commit is contained in:
1
tests/expected/ffi-objc-call-11-bool-return.exit
Normal file
1
tests/expected/ffi-objc-call-11-bool-return.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
3
tests/expected/ffi-objc-call-11-bool-return.txt
Normal file
3
tests/expected/ffi-objc-call-11-bool-return.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
nil bool = false
|
||||
yes = true
|
||||
no = false
|
||||
Reference in New Issue
Block a user