From 9764f3f38426b452bb7ae9f520ca7dfd25755bd2 Mon Sep 17 00:00:00 2001 From: Carsten Bormann Date: Mon, 20 Jan 2014 20:42:46 +0100 Subject: [PATCH] Fix functions as default values in records successful check_value/2 needs to return its second argument --- lib/elixir/lib/record.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/elixir/lib/record.ex b/lib/elixir/lib/record.ex index e3f58df21f5..8c42e0e8861 100644 --- a/lib/elixir/lib/record.ex +++ b/lib/elixir/lib/record.ex @@ -916,6 +916,7 @@ defmodule Record do raise ArgumentError, message: "record field default value #{inspect atom} can only contain " <> "functions that point to an existing &Mod.fun/arity" end + other end defp check_value(atom, other) when is_reference(other) or is_pid(other) or is_port(other) do