A single underscore is a valid atom, but this code
defmodule Thingy do
@derive Jason.Encoder
defstruct [
:_
]
end
results in:
error: invalid use of _. _ can only be used inside patterns to ignore values and cannot be used in expressions. Make sure you are inside a pattern or change it accordingly
│
10 │ defstruct [
│ ^^^^^^^^^^^
│
└─ lib/thingy.ex:10: Jason.Encoder.Thingy.encode/2
A single underscore is a valid atom, but this code
results in: