[erlang-questions] The compiler "eats" structures which are not separated by commas

Gleb Peregud gleber.p@REDACTED
Fri Apr 20 13:31:34 CEST 2012


It is a well known culprit of Erlang pre-processor. It's here:
http://erlang.org/pipermail/erlang-bugs/2011-July/002528.html

On Fri, Apr 20, 2012 at 13:27, Serge Polkovnikov
<serge.polkovnikov@REDACTED> wrote:
> Hi!
> Have found some error.
> The compiler "eats" structures which are not separated by commas.
>
> Example:
>
> -module(new_file).
> -export([start/0]).
> -record(haha,  { v } ).
>
> start() ->
>     [
>      #haha{v=1}   %% No comma here
>      #haha{v=2}   %% No comma here
>      #haha{v=3}
>     ].
>
> The result:
>
> Eshell V5.9.1  (abort with ^G)
> 1> c(new_file).
> {ok,new_file}
> 2> new_file:start().
> [{haha,3}]
> 3>
>
>
> --Serge
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list