Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang
erlang
2461-erts_internal-Avoiding-breaking-opacity-fo...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2461-erts_internal-Avoiding-breaking-opacity-for-iterator.patch of Package erlang
From e9c81ceec583c5ee825aed622749a2fd9794e1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Tue, 7 Feb 2023 12:38:45 +0100 Subject: [PATCH] erts_internal: Avoiding breaking opacity for iterators Dialyzer would complain that code that used map generators with iterators would break the opacity of the iterators. Change the spec for the internal helper functions to not claim they return map iterators from the `maps` module. --- erts/preloaded/ebin/erts_internal.beam | Bin 29848 -> 29840 bytes erts/preloaded/src/erts_internal.erl | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl index 7286c3eedc..a27e39dc26 100644 --- a/erts/preloaded/src/erts_internal.erl +++ b/erts/preloaded/src/erts_internal.erl @@ -444,9 +444,9 @@ map_next(_I, _M, _A) -> %% Introduced in Erlang/OTP 26. This function is a helper, called from %% code generated by the compiler. It must be kept compatible as long %% code calling this helper can still be loaded. --spec mc_iterator(MapOrIter) -> NI | [] when +-spec mc_iterator(MapOrIter) -> NI when MapOrIter :: map() | maps:iterator(), - NI :: maps:iterator(). + NI :: term(). mc_iterator(Map) when is_map(Map) -> erts_internal:map_next(0, Map, iterator); @@ -491,7 +491,7 @@ is_map_iter(Iter) -> M :: map(), K :: term(), V :: term(), - NI :: maps:iterator(). + NI :: term(). mc_refill([Path | Map]) -> erts_internal:map_next(Path, Map, iterator). -- 2.35.3
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