blob: 2da708cb153e79ac1681039ff0509800bc68d1d8 (
plain) (
tree)
|
|
%%=====================================================================
%% From: Ken Robinson
%% Date: 28/04/2011, 17:26
%%
%% Program that produced borus "Function has no local return" warnings
%% due to erlang:list_to_bitstring/1 having erroneous hard coded type
%% information, namely accepting iolist() instead of bitstrlist().
%% Fixed 29/04/2011.
%%=====================================================================
-module(list_to_bitstring).
-export([l2bs/0, l2bs_ok/0]).
%% This function was producing a warning
l2bs() ->
erlang:list_to_bitstring([<<42>>, <<42:13>>]).
%% while this one was ok.
l2bs_ok() ->
erlang:list_to_bitstring([<<42>>, <<42,42>>]).
|