io:format/1+2 in OTP 21 doesn't take iodat() anymore

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

io:format/1+2 in OTP 21 doesn't take iodat() anymore

Adam Lindberg-7

Haven’t found any information anywhere in the changelogs about this, but there seems to be a “regression” in the way io:format/1+2 works.

It used to be possible to call it with a mixed IO list of binaries and strings (iodata()), but this is no longer possible:

    14> io:format(["foo", "bar"]).
    15> io:format([<<"foo">>, "bar"]).
    ** exception error: bad argument
         in function  io:format/3
            called as io:format(<0.63.0>,[<<"foo">>,"bar"],[])

It seems it was never documented, as the format was always 'atom() | string() | binary()', but in practice 'iodata()' was allowed. Is this change intentional or is it a bug?


erlang-questions mailing list
[hidden email]

signature.asc (849 bytes) Download Attachment