aboutsummaryrefslogtreecommitdiffstats
path: root/HOWTO
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-05-25 10:23:20 +0200
committerBjörn Gustavsson <[email protected]>2019-05-25 10:40:41 +0200
commitbfeef8e0c1639ac7d6a35122b8b62a3c2f3575bf (patch)
tree727221b4b97bc2263ac740cfd808d7b418e075ef /HOWTO
parent67332107e0e8421e2997c0e5154ca4dbd7f508b5 (diff)
downloadotp-bfeef8e0c1639ac7d6a35122b8b62a3c2f3575bf.tar.gz
otp-bfeef8e0c1639ac7d6a35122b8b62a3c2f3575bf.tar.bz2
otp-bfeef8e0c1639ac7d6a35122b8b62a3c2f3575bf.zip
Fix unsafe optimizations where guard tests could be removed
A repeated test could be optimized away. Example: bar(A) -> if is_bitstring(A) -> if is_binary(A) -> binary; true -> bitstring end; true -> other end. In the example, the `is_binary/1` test would be optimized away, basically turning the example into: bar(A) -> if is_bitstring(A) -> bitstring; true -> other end. Thanks user Marcus Kruse in the Elixir forum for noticing this bug.
Diffstat (limited to 'HOWTO')
0 files changed, 0 insertions, 0 deletions