Repository navigation
-
asyncTry:- Fixed: a synchronously throwing
onFinallywas swallowed whenonErrorwas set (on success theonFinally
error was passed toonErrorand the original result returned; on failure theonErrorresult was returned),
while it propagated in every other combination (asynconFinallyfailures, or noonError).
Now, as in a Darttry/catch/finally, anonFinallyerror always replaces the result and is never passed to
onError.
- Fixed: a synchronously throwing
-
FutureOrExtension:- Fixed
resolvewith an asyncvalidatecallback, andvalidateon aFuturevalue withoutdefaultValue,
that threw aTypeError(Future<T?>/Nullcast toFutureOr<T>) for non-nullableT.
- Fixed
-
FunctionArgs0Extension,FunctionArgs1Extension,FunctionArgs2Extension:- Fixed
tryCallThen: when the function returns aFuture,onErrornow also handles errors fromonValue,
as it already did for synchronous results.
- Fixed
-
ComputeOnce:- Fixed
resolveAsync(throwError: false)on a cached error withoutonError/onErrorValuefor a non-nullable
V: it threw aTypeErrorsynchronously; it now returns a failedFuturewith aStateError
(same as the in-flight path andresolve).
- Fixed
-
Tests:
- Added
async_extension_try_finally_test.dart: the fullasyncTrymatrix (sync/async body, success/failure,
with/withoutthen/onError,onFinallyok/throwing, sync/async). - Added
async_extension_combinatorial_test.dart: sync/async combinations of theFutureOrhelpers,
tryCall/tryCallThen, iterable/map helpers, loops,asyncRetryedge cases andComputeOnce/
ComputeOnceCache/ComputeOnceCachedIDswith many concurrent resolvers. - Added
async_extension_integration_test.dart: multi-step pipelines combining several helpers. - Tests: 244 -> 486.
- Line coverage: 99.1% -> 99.3%.
- Added