We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 360c239 commit 22467abCopy full SHA for 22467ab
lib/elixir/lib/exception.ex
@@ -2541,7 +2541,7 @@ defmodule ErlangError do
2541
is_map(module) and is_atom(function) and is_map_key(module, function) ->
2542
"you attempted to apply a function named #{inspect(function)} on a map/struct. " <>
2543
"If you are using Kernel.apply/3, make sure the module is an atom. " <>
2544
- if is_function(module[function]) do
+ if is_function(Map.get(module, function)) do
2545
"If you are trying to invoke an anonymous function in a map/struct, " <>
2546
"add a dot between the function name and the parenthesis: map.#{function}.()"
2547
else
0 commit comments