[erlang-questions] Bug ?!
datacompboy
datacompboy@REDACTED
Mon Oct 2 05:27:01 CEST 2006
Is that a bug of compiler?
-module(a).
-record(x, {a, b, c}).
-export([bug/1]).
bug(X) ->
receive
{msg, X#x.a} -> ok
after 0 -> ok
end.
We got "illegal pattern" on {msg, X#x.a}.
If we change code so:
bug(X) ->
XA = X#x.a,
receive
{msg, XA} -> ok
after 0 -> ok
end.
it works. Is that bug of records compilation, or feature?!
--
--- suicide proc near\n call death\n suicide endp
_________________________________________________________
Post sent from http://www.trapexit.org
More information about the erlang-questions
mailing list