Skip to content

Commit 5e7190c

Browse files
authored
Fix static_atoms_encoder docs and spec (#15294)
Fixes #15293
1 parent 4ad7497 commit 5e7190c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/elixir/lib/code.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ defmodule Code do
286286
existing_atoms_only: boolean(),
287287
token_metadata: boolean(),
288288
literal_encoder: (term(), Macro.metadata() -> term()),
289-
static_atoms_encoder: (atom() -> term()),
289+
static_atoms_encoder: (binary(), Macro.metadata() -> {:ok, term()} | {:error, binary()}),
290290
emit_warnings: boolean()
291291
]
292292

@@ -1319,7 +1319,7 @@ defmodule Code do
13191319
and keyword lists.
13201320
13211321
The encoder function will receive the atom name (as a binary) and a
1322-
keyword list with the current file, line and column. It must return
1322+
keyword list with the current line and column. It must return
13231323
`{:ok, token :: term} | {:error, reason :: binary}`.
13241324
13251325
The encoder function is supposed to create an atom from the given

0 commit comments

Comments
 (0)