elixir-lang/elixir — pull request #2012 by cabo (2014-01-20 19:51:57+00:00)
Title: Fix functions as default values in records

successful check_value/2 needs to return its second argument

before:

iex(1)> defrecord Baz, foo: &Dict.get/1, bar: 4711
iex(2)> IO.puts inspect Baz[]
Baz[foo: nil, bar: 4711]
:ok
iex(3)>

after:

iex(4)> defrecord Baz, foo: &Dict.get/1, bar: 4711
iex(5)> IO.puts inspect Baz[]
Baz[foo: &Dict.get/1, bar: 4711]
:ok
iex(6)>