From 3503e50532935a8dbc800de2dbb305e42b683d7b Mon Sep 17 00:00:00 2001 From: Kiko Fernandez-Reyes Date: Tue, 14 Jan 2025 09:48:02 +0100 Subject: [PATCH] kernel: fixes socket.erl type spec the type specs for socker.erl were improved in PR-8986, but they introduced a bug by omitting one of the overloaded specs. --- lib/kernel/src/socket.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kernel/src/socket.erl b/lib/kernel/src/socket.erl index 44b0c40f5d56..973a05047d6d 100644 --- a/lib/kernel/src/socket.erl +++ b/lib/kernel/src/socket.erl @@ -3763,7 +3763,9 @@ an explanation of `TimeoutOrHandle`. """. -spec sendto(Socket :: socket(), Data :: iodata(), - Dest :: sockaddr(), Flags :: list()) -> Result when + Dest :: sockaddr(), Flags | TimeoutOrHandle) -> Result when + TimeoutOrHandle :: dynamic(), + Flags :: list(), Result :: 'ok' | {'ok', RestData :: binary()} | {'error', Reason}