ERR/E5.1: bare failable fn-type param resolution + non-failable->failable widening

Two more E5.1 composition pieces:
- inferExprType .call: a callee that's a local variable of bare  type
  () now resolves to its declared return type (only
  was handled before), so  /  on the call see the failable result
  instead of .
- createClosureToBareFnAdapter now widens: when a NON-failable closure literal
  flows into a failable bare slot (∅ ⊆ slot set, success type matches), the
  adapter wraps the value into the slot's  tuple via
  lowerFailableSuccessReturn — previously rejected. The failable->non-failable
  and capturing->bare crossings stay rejected.

Adapter generation fires for closure LITERALS flowing into a bare-fn slot; a
pre-bound closure VARIABLE into a bare-fn slot is a separate coercion-site path,
still unhandled (noted in CHECKPOINT-ERR). Regression:
examples/1040-errors-failable-closure-composition. Suite: 329 passed.
This commit is contained in:
agra
2026-06-01 20:56:10 +03:00
parent 06e2685350
commit b113e03fa3
5 changed files with 65 additions and 8 deletions

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1,3 @@
bare ok=10 err=-2
chain ok=10 err=0
widen=10