ExprTyper.inferType had no `.force_unwrap` arm, so `mk()!` typed as `.unresolved`. The bind-first form (`v := mk()!; v.field`) worked because lowerForceUnwrap produces a correctly typed value stored in a slot, but the chained `mk()!.field` re-derives the receiver type via inferExprType and got `.unresolved` — the struct-field lookup failed, the field read emitted as `undef` (garbage), and `mk()!.method()` failed to resolve the method. Add a `.force_unwrap` arm resolving the operand's optional child type. One arm fixes every chained form — field, nested `opt!.a.b`, `opt!.method()` (pointer + value receiver), and `opt![i]` all route receiver typing through inferExprType. Regression: examples/0905-optionals-unwrap-field-chain.sx — garbage / compile error pre-fix, all correct after.
2 B
2 B