Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-09-02 | Fix overridden BIFs | Björn Gustavsson | |
The filters in a list comprehension can be guard expressions or an ordinary expressions. If a guard expression is used as a filter, an exception will basically mean the same as 'false': t() -> L = [{some_tag,42},an_atom], [X || X <- L, element(1, X) =:= some_tag] %% Returns [{some_tag,42}] On the other hand, if an ordinary expression is used as a filter, there will be an exception: my_element(N, T) -> element(N, T). t() -> L = [{some_tag,42},an_atom], [X || X <- L, my_element(1, X) =:= some_tag] %% Causes a 'badarg' exception when element(1, an_atom) is evaluated It has been allowed for several releases to override a BIF with a local function. Thus, if we define a function called element/2, it will be called instead of the BIF element/2 within the module. We must use the "erlang:" prefix to call the BIF. Therefore, the following code is expected to work the same way as in our second example above: -compile({no_auto_import,[element/2]}). element(N, T) -> erlang:element(N, T). t() -> L = [{some_tag,42},an_atom], [X || X <- L, element(1, X) =:= some_tag]. %% Causes a 'badarg' exception when element(1, an_atom) is evaluated But the compiler refuses to compile the code with the following diagnostic: call to local/imported function element/2 is illegal in guard | |||
2016-03-15 | update copyright-year | Henrik Nord | |
2016-02-17 | Makefiles: Remove test_server from include path and code path | Björn Gustavsson | |
Since no test suites includede test_server.hrl, there is no need to have test_server in the include path or code path. | |||
2015-06-18 | Change license text to APLv2 | Bruce Yinhe | |
2014-02-06 | debugger: Fix release_tests | Björn-Egil Dahlberg | |
2012-08-31 | Update copyright years | Björn-Egil Dahlberg | |
2012-06-05 | Update to work with whitespace in exec path | Lukas Larsson | |
OTP-10106 OTP-10107 | |||
2011-08-18 | debugger: Add line_number_SUITE | Björn Gustavsson | |
2011-03-30 | Merge branch 'hw/call-chmod-without-f' into dev | Henrik Nord | |
* hw/call-chmod-without-f: Call chmod without the "-f" flag Conflicts: erts/emulator/test/Makefile lib/asn1/test/Makefile lib/crypto/test/Makefile lib/debugger/test/Makefile lib/docbuilder/test/Makefile lib/edoc/test/Makefile lib/erl_interface/test/Makefile lib/inviso/test/Makefile lib/parsetools/test/Makefile lib/percept/test/Makefile lib/ssl/test/Makefile lib/syntax_tools/test/Makefile lib/test_server/test/Makefile lib/tools/test/Makefile OTP-9170 | |||
2011-03-11 | Update copyright years | Björn-Egil Dahlberg | |
2011-02-17 | Update and add cover spec files to work with common_test | Lukas Larsson | |
2010-11-15 | Call chmod without the "-f" flag | Holger Weiß | |
"-f" is a non-standard chmod option which at least SGI IRIX and HP UX do not support. As the only effect of the "-f" flag is to suppress warning messages, it can be safely omitted. | |||
2010-09-03 | Add test suite for debugger | Björn Gustavsson | |