diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2019-09-12 07:55:09 +0200 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2019-09-13 14:21:52 +0200 |
commit | 5b0fad5f9f13a6001d9e98f8ecab43fede191788 (patch) | |
tree | 8190ab0a5a29d9780a9649644361237904888d33 /lib/compiler/test/compilation_SUITE_data | |
parent | 2b02135970b3f6ec9e02eb6cbc2643d81446a72f (diff) | |
download | erlang-5b0fad5f9f13a6001d9e98f8ecab43fede191788.tar.gz |
v3_core: Fix wrapping of float/1 call
When translating guards, any calls to BIFs that are not known
to always return booleans should be wrapped in a comparison
with `true`. This was not done for `float/1` BIF (as a conversion
function, not the obsolete type test). Here is an example of
a function where the `float/1` calls were not wrapped:
foo(X) when float(X) or float(X) -> ok.
Not wrapping `float/1` happens to be harmless, but is an
annyoing inconsistency.
With the correction, the guard will be rewritten like this
during the translatation to Core Erlang:
foo(X) when (float(X) =:= true) or (float(X) =:= true) -> ok.
Diffstat (limited to 'lib/compiler/test/compilation_SUITE_data')
0 files changed, 0 insertions, 0 deletions