Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
3151-beam_call_types-Improve-types-of-maps-from...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3151-beam_call_types-Improve-types-of-maps-from_list-1-et.patch of Package erlang
From 5e2d2196e082b5c2dc21a9b16f5be69bd0a5ffbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org> Date: Mon, 7 Feb 2022 15:38:30 +0100 Subject: [PATCH] beam_call_types: Improve types of maps:from_list/1 et al --- lib/compiler/src/beam_call_types.erl | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/compiler/src/beam_call_types.erl b/lib/compiler/src/beam_call_types.erl index f7764c295f..10f98eac1f 100644 --- a/lib/compiler/src/beam_call_types.erl +++ b/lib/compiler/src/beam_call_types.erl @@ -604,8 +604,11 @@ types(maps, fold, [Fun, Init, _Map]) -> end, sub_unsafe(RetType, [#t_fun{arity=3}, any, #t_map{}]); types(maps, from_keys, [Keys, Value]) -> - RetType = #t_map{super_key=erlang_hd_type(Keys), - super_value=Value}, + KeyType = erlang_hd_type(Keys), + RetType = case KeyType of + none -> #t_map{super_key=none,super_value=none}; + _ -> #t_map{super_key=KeyType,super_value=Value} + end, sub_unsafe(RetType, [proper_list(), any]); types(maps, from_list, [Pairs]) -> PairType = erlang_hd_type(Pairs), -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor