with x <- 1 do :ok else _ -> ;0 end
- 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 _ ->
;0 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, 0]}]}
]
]
]}
```
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}], 0]}
]
]
]}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the provided with/else expression and compare the Elixir AST with the Spitfire AST, focusing on the else branch's __block__ containing nil and 0. Trace the AST conversion entry point that handles this construct; done means Spitfire preserves the expected else-branch structure without changing the represented expression.
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
- 50/100