[erlang-questions] Record initializer work-around for smart_exceptions?

Matthew Dempsky <>
Sat Apr 26 10:24:32 CEST 2008


On Fri, Apr 25, 2008 at 2:15 PM, Scott Lystig Fritchie
<> wrote:
>     -module(foo).
>     -compile(export_all).
>
>     %% -record(foo, { item = 0 }).  % works
>     -record(foo, { item = -1 }). % doesn't work
>     %% -record(foo, { item = erlang:now() }).  % doesn't work
>     %% -record(foo, { item = now() }). % works
>
>     func() -> #foo{}.

This module compiles fine for me with R11B-2 and R12B-1.  Can you give
a more complete test case that is failing for you?



More information about the erlang-questions mailing list