kerelape/reikai

`Empty`

Closed this issue · 3 comments

Describe the bug
When trying to perform a logical operation on Empty, BigInteger throws an exception.

Expected behavior
Empty must be treated like False

What about to add Entity#asInt? It will allow to fix this, but will bring another knowledge of higher type to the Entity.

@Masynchin I think we can add a check for this failure into toBoolean and return False object in case the exception occurs

@Masynchin I think we can add a check for this failure into toBoolean and return False object in case the exception occurs

Seems legit.