walk-parts walks the type as well as the initializer. A list whose head is an in-scope closure is rewritten as a closure call, including a parameter name inside a fn type.
When the ranks tie this keeps the left operand, so the declared type depends on the order of the source.
resolve-closure-types runs here and resolve-wildcard does not. (var n _ 1) at toplevel emits static _ n = 1. cc: unknown type name '_'. The same form inside a function becomes int n = 1.
Built and ran this on CHICKEN 6.0.0 at 9daaa42. make run-tests is green, including closures, fixpoint, wildcards, and inference. The holes below are outside that suite. I compiled each one with ./sexc -C and, where it emitted C, with cc.
The callee is typed before it is walked, so a closure literal has no type yet and falls through to convert-arguments. After the walk the form is a call of the constructor:
An array operand is returned as the array. decay in infer.scm is the conversion this comment describes, and nothing in the walk calls it.
A subscript types only when the base's surface form is already (¤ ...). An (* int) is not, so