Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/stdlib/src/erl_lint.erl
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ format_error_1({removed_type, MNA, String}) ->
format_error_1({removed_callback, MNA, String}) ->
{~"the callback ~s is removed; ~s", [format_mna(MNA), String]};
format_error_1({obsolete_guard, {F, A}}) ->
{~"~p/~p obsolete (use is_~p/~p)", [F, A, F, A]};
{~"""
~p/~p as a type test is obsolete and will be
removed in OTP 30; use is_~p/~p instead.
""", [F, A, F, A]};
format_error_1({obsolete_guard_overridden,Test}) ->
{~"""
obsolete ~s/1 (meaning is_~s/1) is illegal when there is a
Expand Down
37 changes: 32 additions & 5 deletions system/doc/general_info/scheduled_for_removal_30.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
<!--
%CopyrightBegin%
%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2024-2025. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
%% %CopyrightEnd%
-->

SPDX-License-Identifier: Apache-2.0
### Old aliases for type tests in guards

The type test aliases `atom/1`, `binary/1`, `float/1`, `function/1`,
`integer/1`, `list/1`, `number/1`, `pid/1`, `port/1`, `record/2`,
`reference/1`, and `tuple/1`, for the respective tests `is_atom/1`,
`is_binary/1`, `is_float/1`, ..., `is_tuple/2`, have been deprecated since
before OTP R13 and have been scheduled for removal in OTP 30. Note that
these aliases could only be used as guard tests at the top level. For
example, in `{X, Y} when float(X), X =:= float(Y) -> ...` the first use of
`float/1` is a type test alias, but the second use is the normal
integer-to-float conversion BIF, because it occurs inside the `=:=`. The
aliases were never recognized outside guards.

Copyright Ericsson AB 2025. All Rights Reserved.

%CopyrightEnd%
-->

### Distribution Control Messages

Expand Down
Loading