Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix functions as default values in records #2012

Merged
merged 1 commit into from Jan 21, 2014
Merged

Conversation

cabo
Copy link
Contributor

@cabo cabo commented Jan 20, 2014

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)>

successful check_value/2 needs to return its second argument
@cabo
Copy link
Contributor Author

cabo commented Jan 20, 2014

(This of course also needs a test that fails now and succeeds after pulling. Left as an exercise for the merger, based on the example given above. Sorry about that.)

josevalim pushed a commit that referenced this pull request Jan 21, 2014
Fix functions as default values in records
@josevalim josevalim merged commit bfc165c into elixir-lang:master Jan 21, 2014
@josevalim
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants