[erlang-bugs] Parser bug: if missing ", " in list between records, the first is ignored, and no parser warnings are given.

Roland Karlsson roland.karlsson@REDACTED
Sun Nov 16 21:50:44 CET 2014


Also that is perfectly fine.
Nothing strange at all.

You create a record, using tuple syntax, and then modifies
it using record syntax.

Extremely ugly and not recommended. Here I can agree that
a warning is motivated. But ... it is perfectly legal Erlang syntax.

You are misunderstanding the record and tuple syntax.

/Roland




On Sun, 16 Nov 2014 21:45:43 +0100
PAILLEAU Eric <eric.pailleau@REDACTED> wrote:

> Le 16/11/2014 21:32, PAILLEAU Eric a écrit :
> >
> > 3> #test{a=5}{test, 7,6}.
> > * 2: syntax error before: '{'
> 
> but :
> 
> 2> ({test, 7,6})#test{a=5}.
> #test{a = 5,b = 6}
> 
> !!!
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs

-- 
Roland Karlsson <roland.karlsson@REDACTED>




More information about the erlang-bugs mailing list