From e81df917899eafdb3a1337315a9872b504ede7a7 Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Tue, 21 Apr 2026 13:15:12 +0200 Subject: [PATCH] Fix static_atoms_encoder docs and spec Fixes #15293 --- lib/elixir/lib/code.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/code.ex b/lib/elixir/lib/code.ex index 0dc8a3ac9a3..3a76c771cff 100644 --- a/lib/elixir/lib/code.ex +++ b/lib/elixir/lib/code.ex @@ -286,7 +286,7 @@ defmodule Code do existing_atoms_only: boolean(), token_metadata: boolean(), literal_encoder: (term(), Macro.metadata() -> term()), - static_atoms_encoder: (atom() -> term()), + static_atoms_encoder: (binary(), Macro.metadata() -> {:ok, term()} | {:error, binary()}), emit_warnings: boolean() ] @@ -1319,7 +1319,7 @@ defmodule Code do and keyword lists. The encoder function will receive the atom name (as a binary) and a - keyword list with the current file, line and column. It must return + keyword list with the current line and column. It must return `{:ok, token :: term} | {:error, reason :: binary}`. The encoder function is supposed to create an atom from the given