AI REVIEWED
Module: api
File: api/optic/Iso.java (~line 390-393)
Severity: High
Summary
Calling compose() on a reversed Iso throws UnsupportedOperationException with the message "Compose on reversed iso". This is unexpected since regular Iso instances support composition.
Expected Behavior
A reversed Iso should either:
- Support composition (reverse the composition order), or
- Clearly document that reversed isos are not composable, with a rationale
Actual Behavior
Throws UnsupportedOperationException at runtime with a cryptic message, providing no guidance to the caller.
Suggested Fix
Either implement composition for reversed isos (mathematically: (iso.reverse()).compose(other) = other.compose(iso).reverse()) or add prominent JavaDoc on reverse() explaining this limitation.
AI REVIEWED
Module: api
File:
api/optic/Iso.java(~line 390-393)Severity: High
Summary
Calling
compose()on a reversedIsothrowsUnsupportedOperationExceptionwith the message "Compose on reversed iso". This is unexpected since regularIsoinstances support composition.Expected Behavior
A reversed
Isoshould either:Actual Behavior
Throws
UnsupportedOperationExceptionat runtime with a cryptic message, providing no guidance to the caller.Suggested Fix
Either implement composition for reversed isos (mathematically:
(iso.reverse()).compose(other)=other.compose(iso).reverse()) or add prominent JavaDoc onreverse()explaining this limitation.