aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-05-28 12:14:26 +0200
committerHans Bolinder <[email protected]>2018-05-28 15:26:29 +0200
commit186d8be66dd3d8eef24935c69c05723e15d00047 (patch)
tree79e6c59d7e0cb7aee5b83f9862b0de190529e473 /lib/compiler/src
parent324fc38bc442460f871f3ae002dd853415ae9e51 (diff)
downloadotp-186d8be66dd3d8eef24935c69c05723e15d00047.tar.gz
otp-186d8be66dd3d8eef24935c69c05723e15d00047.tar.bz2
otp-186d8be66dd3d8eef24935c69c05723e15d00047.zip
compiler: Improve a contract
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_asm.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index 5ef340c831..df0321e85a 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2017. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -475,7 +475,7 @@ encode_alloc_list_1([{floats,Floats}|T], Dict, Acc0) ->
encode_alloc_list_1([], Dict, Acc) ->
{iolist_to_binary(Acc),Dict}.
--spec encode(non_neg_integer(), integer()) -> iodata().
+-spec encode(non_neg_integer(), integer()) -> iolist() | integer().
encode(Tag, N) when N < 0 ->
encode1(Tag, negative_to_bytes(N));