Skip to content

Commit bfc165c

Browse files
author
José Valim
committed
Merge pull request #2012 from cabo/master
Fix functions as default values in records
2 parents b1915b1 + 9764f3f commit bfc165c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/elixir/lib/record.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ defmodule Record do
916916
raise ArgumentError, message: "record field default value #{inspect atom} can only contain " <>
917917
"functions that point to an existing &Mod.fun/arity"
918918
end
919+
other
919920
end
920921

921922
defp check_value(atom, other) when is_reference(other) or is_pid(other) or is_port(other) do

0 commit comments

Comments
 (0)