Defaulting to equality with a @
Opened this issue · 0 comments
josephwilk commented
@a=10
fact "equality with @" do
10 |> @a
end
Raises the error
** (CompileError) test/tennis/game_test.exs:32: function '@'/2 undefined
lists.erl:1323: :lists.foreach/2
/private/tmp/elixir-NwV5/elixir-0.10.3/lib/elixir/lib/code.ex:290: Code.require_file/2
/private/tmp/elixir-NwV5/elixir-0.10.3/lib/elixir/lib/kernel/parallel_require.ex:50: Kernel.ParallelRequire."-spawn_requires/5-fun-1-"/5
Re-writing explicitly works (but you should be able to do the above):
@a=10
fact "equality with @" do
10 |> equals @a
end
Thanks to @BjRo tennis example that helped me spot this.