[erlang-questions] erl_syntax and bitstrings ?

Yoshihiro Tanaka hirotnkg@REDACTED
Fri Feb 24 07:03:07 CET 2017


Hi, I encountered following case where erl_syntax:abstract/1 returns
exception when given a bitstring:

4> erl_syntax:abstract(<<0:1>>).
> ** exception error: bad argument: <<0:1>>
>      in function  erl_syntax:abstract/1 (erl_syntax.erl, line 5951)


Is this expected ? The document says:

> Term must be a literal term, i.e., one that can be represented as a source
> code literal.


I guess <<0:1>> can be put in a source code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170223/eca425e0/attachment.htm>


More information about the erlang-questions mailing list