Skip to content

Parse the valid end-of-expression examples in parser tests - #16063

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:fix/parse-end-of-expression-examples
Nov 7, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:fix/parse-end-of-expression-examples

Conversation

@preciz

@preciz preciz commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

The valid end-of-expression examples are passed as a charlist to
Code.eval_quoted/1, which evaluates the literal without parsing
its contents.

Use Code.string_to_quoted!/1 so these examples actually exercise
the parser and fail if their syntax is rejected. Give the two empty
arrow clauses explicit nil bodies so the examples parse without
warnings.

Assisted-by: Codex:gpt-6.1-sol

…teral charlist

Assisted-by: Codex:gpt-6.1-sol
@josevalim
josevalim merged commit 11f5616 into elixir-lang:main Nov 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants