Adds `resolveFunctionTypeWithBindings` so `function_type_expr` in a binding-aware context — local var annotations, return types, nested type expressions — recursively resolves through the active pack bindings. Without this, the fall-through to `type_bridge.resolveAstType` lost pack context and the new `pack_index_type_expr` arm spammed the "outside pack-aware context" diagnostic (the function still worked by accident thanks to the `.s64` fallback). Plumbing: - `resolveTypeWithBindings` adds a `function_type_expr` case in both the bindings-active branch and the fallthrough switch (the same shape as `closure_type_expr`). - `resolveFunctionTypeWithBindings` recursively resolves each param + return type with bindings, then calls `functionTypeCC` with the AST's calling convention. `examples/167-pack-type-fnptr.sx` exercises the pattern step 5's trampoline needs: fp : (*void, $args[0]) -> $args[1] = double_s64; return fp(null, args[0]); Output: 14 (= 7*2 via the typed fn-pointer). 207/207 example tests + `zig build test` green.
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
0
|