diff options
author | John Högberg <[email protected]> | 2019-05-29 15:30:51 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-06-11 15:47:38 +0200 |
commit | 43a386436b817e8d93fea8f6ea719f9162192241 (patch) | |
tree | 54cd6bd8563963c9e01db93c7d3451c077ed11c9 /lib/compiler/src/beam_ssa_type.erl | |
parent | 626c68069acca0a5178478e0aad9710a472d3dd6 (diff) | |
download | otp-43a386436b817e8d93fea8f6ea719f9162192241.tar.gz otp-43a386436b817e8d93fea8f6ea719f9162192241.tar.bz2 otp-43a386436b817e8d93fea8f6ea719f9162192241.zip |
beam_validator: Use integers as tuple element keys
This simplifies a later migration to a unified type format, as the
literal representation may differ between passes, so passing
container types keyed by literals will fail.
Diffstat (limited to 'lib/compiler/src/beam_ssa_type.erl')
-rw-r--r-- | lib/compiler/src/beam_ssa_type.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_ssa_type.erl b/lib/compiler/src/beam_ssa_type.erl index 612277393e..da73dc26f7 100644 --- a/lib/compiler/src/beam_ssa_type.erl +++ b/lib/compiler/src/beam_ssa_type.erl @@ -177,10 +177,9 @@ validator_anno(#t_fun{}) -> any; validator_anno(#t_tuple{size=Size,exact=Exact,elements=Elements0}) -> Elements = maps:fold(fun(Index, Type0, Acc) -> - Key = beam_validator:type_anno(integer, Index), case validator_anno(Type0) of any -> Acc; - Type -> Acc#{Key=>Type} + Type -> Acc#{ Index => Type } end end, #{}, Elements0), beam_validator:type_anno(tuple, Size, Exact, Elements); |