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:
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
bare ok=10 err=-2
|
||||
chain ok=10 err=0
|
||||
widen=10
|
||||
Reference in New Issue
Block a user