abacus icon indicating copy to clipboard operation
abacus copied to clipboard

Eval() function return type for boolean expression

Open ChrisRad89 opened this issue 3 years ago • 1 comments
trafficstars

This is just a cosmetic thing, but maybe interesting for others...

The dialyzer is complaining about the eval function and a boolean expression. According to the docs, the return type is always a number(), which is not correct in the case of an boolean expression evaluation. There the return value is an atom(), 'true' or 'false'. So is there a way to tell the eval function that we have an boolean return value? Or change the return value in general to any()?

ChrisRad89 avatar Jul 06 '22 08:07 ChrisRad89

probably should change it to any, since it could also be that a value from the scope is returned, which can really be anything.

narrowtux avatar Aug 01 '22 13:08 narrowtux