From 2d787c3546629c6376a23a65a9c5e80ff985d5af Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Wed, 26 Feb 2025 15:36:17 +0100 Subject: [PATCH] Return the right type from ets:update_element/4 spec Note that the documentation already says that this function can return both boolean values, and it was the spec what was incomplete. --- lib/stdlib/src/ets.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index 56c44aed549a..a2b460e5571f 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -1796,7 +1796,7 @@ The function fails with reason `badarg` in the following situations: - The element to update is also the key. """. -doc(#{since => <<"OTP 27.0">>}). --spec update_element(Table, Key, ElementSpec, Default) -> true when +-spec update_element(Table, Key, ElementSpec, Default) -> boolean() when Table :: table(), Key :: term(), ElementSpec :: {Pos, Value} | [{Pos, Value}],