Age | Commit message (Collapse) | Author |
|
Running 'dbg:fun2ms(fun([]) -> return_trace() end' resulted in an error
"dbg:fun2ms requires fun with single variable or list parameter"
But the empty list is actually a list and it is a valid value as a
match-spec head (matching on arity-0 functions).
Although its practical use is questionable this commit eliminates a
small limitation of ms_transform which is not present in the match-spec
grammar.
|
|
|
|
|
|
While we are it, also re-ident the files.
|
|
We want to re-ident the source files after having taken out
all ?line macros. When re-indenting using Emacs, it's important
that comments that should be at the beginning of a line (or
follow the indentation of statements around it) must start with
"%%".
|
|
|
|
Either rely on the default 30 minutes timetrap, or set the timeout
using the supported methods in common_test.
|
|
* bjorn/remove-test_server/OTP-12705:
Remove test_server as a standalone application
Erlang mode for Emacs: Include ct.hrl instead test_server.hrl
Remove out-commented references to the test_server applications
Makefiles: Remove test_server from include path and code path
Eliminate use of test_server.hrl and test_server_line.hrl
|
|
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
A shadowed variable in an ms_transform match expression emits a warning
located at the match expression instead of the variable.
|
|
|
|
|
|
Compile below module resulting incorrect warning:
$ cat tmp.erl
-module(tmp).
-export([tmp/1]).
-include_lib("stdlib/include/ms_transform.hrl").
tmp(X) when X > 100 ->
Y=X,
Y;
tmp(X) ->
ets:fun2ms(fun(Y) -> {X, Y} end).
$ erlc tmp.erl
./tmp.erl:8: Warning: variable 'Y' shadowed in ms_transform fun head
The scope for a variable is its function clause. Variables bound in one
function clause should not interfere with other function clauses.
This patch removes incorrect passing of variable bindings from one
function clause to another.
Signed-off-by: Haitao Li <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* bg/cleanup-tests:
file_SUITE: eliminate a warning for an unused variable
kernel tests: modernize guard tests
unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1
stdlib tests: modernize guard tests
Test suites: fix creation of Emakefiles
|
|
Don't change any guard tests in the id_transform_SUITE
module, because it intentionally use the old guard tests
to test that id_transform can handle them.
|
|
|