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

Serge Polkovnikov <>
Fri Apr 20 13:27:03 CEST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120420/d222296a/attachment.html>


More information about the erlang-questions mailing list