Better resolution results
Closed this issue · 0 comments
JonathanxD commented
Currently there are no way to know if the resolution returned false
because failed to resolve the type or returned false
because type X is not assignable to Y.
Solution
1
Returns EitherObjBoolean<Exception>
(which should be added to JonathanxD/JwIUtils as specialized version of Either
). The left
value (Exception
) may be returned in the case which type resolution fails, and the right
when the type was resolved and the returned value is exactly the response of operation (in other words, the right
value is only available in the cases that resolution does not fail).
2
Returns OptBoolean
, then, None
means not resolved, and Some
resolved with result.