Skip to content

Commit

Permalink
Return the right type from ets:update_element/4 spec
Browse files Browse the repository at this point in the history
Note that the documentation already says that this function can return
both boolean values, and it was the spec what was incomplete.
  • Loading branch information
NelsonVides committed Feb 26, 2025
1 parent 4901447 commit 2d787c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stdlib/src/ets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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}],
Expand Down

0 comments on commit 2d787c3

Please sign in to comment.