mhanberg / mhanberg/test

with x <- 1 do :ok else _ -> ;a end

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

property-failure
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Type: mismatch
Context: with_else_body

Code:
```elixir
with x <- 1 do :ok else _ ->
;a end
```

Elixir AST:
```elixir
{:with,
[do: [line: 1, column: 13], end: [line: 2, column: 4], line: 1, column: 1],
[
{:<-, [line: 1, column: 8], [{:x, [line: 1, column: 6], nil}, 1]},
[
do: :ok,
else: [
{:->, [newlines: 1, line: 1, column: 27],
[
[{:_, [line: 1, column: 25], nil}],
{:__block__, [], [nil, {:a, [line: 2, column: 2], nil}]}
]}
]
]
]}
```

Spitfire AST:
```elixir
{:with,
[do: [line: 1, column: 13], end: [line: 2, column: 4], line: 1, column: 1],
[
{:<-, [line: 1, column: 8], [{:x, [line: 1, column: 6], nil}, 1]},
[
do: :ok,
else: [
{:->, [newlines: 1, line: 1, column: 27],
[[{:_, [line: 1, column: 25], nil}], {:a, [line: 2, column: 2], nil}]}
]
]
]}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the shown `with` expression and comparing the Elixir AST with the Spitfire AST. Focus on the `with_else_body` case and the newline before `a`; done means Spitfire produces the same AST structure as Elixir, including the `__block__` node.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.