Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
0563-empty-containers-more-precise-specs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0563-empty-containers-more-precise-specs.patch of Package erlang
From 98459c71dbe642e0d492e1d00286b6ae9f290599 Mon Sep 17 00:00:00 2001 From: Ilya Klyuchnikov <ilya.klyuchnikov@gmail.com> Date: Wed, 2 Nov 2022 21:55:46 +0000 Subject: [PATCH] empty containers: more precise specs --- lib/stdlib/src/gb_sets.erl | 4 ++-- lib/stdlib/src/gb_trees.erl | 2 +- lib/stdlib/src/orddict.erl | 2 +- lib/stdlib/src/queue.erl | 2 +- lib/stdlib/src/sets.erl | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/stdlib/src/gb_sets.erl b/lib/stdlib/src/gb_sets.erl index 93131d1b24..aba1bed156 100644 --- a/lib/stdlib/src/gb_sets.erl +++ b/lib/stdlib/src/gb_sets.erl @@ -205,13 +205,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec empty() -> Set when - Set :: set(). + Set :: set(none()). empty() -> {0, nil}. -spec new() -> Set when - Set :: set(). + Set :: set(none()). new() -> empty(). diff --git a/lib/stdlib/src/gb_trees.erl b/lib/stdlib/src/gb_trees.erl index 2d5d013a25..54a5ab6690 100644 --- a/lib/stdlib/src/gb_trees.erl +++ b/lib/stdlib/src/gb_trees.erl @@ -169,7 +169,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec empty() -> tree(). +-spec empty() -> tree(none(), none()). empty() -> {0, nil}. diff --git a/lib/stdlib/src/orddict.erl b/lib/stdlib/src/orddict.erl index 9a2772949b..75c73aad3b 100644 --- a/lib/stdlib/src/orddict.erl +++ b/lib/stdlib/src/orddict.erl @@ -36,7 +36,7 @@ %%--------------------------------------------------------------------------- --spec new() -> orddict(). +-spec new() -> orddict(none(), none()). new() -> []. diff --git a/lib/stdlib/src/queue.erl b/lib/stdlib/src/queue.erl index a71121ad2d..82eb7b1df0 100644 --- a/lib/stdlib/src/queue.erl +++ b/lib/stdlib/src/queue.erl @@ -59,7 +59,7 @@ %% Creation, inspection and conversion %% O(1) --spec new() -> queue(). +-spec new() -> queue(none()). new() -> {[],[]}. %{RearList,FrontList} %% O(1) diff --git a/lib/stdlib/src/sets.erl b/lib/stdlib/src/sets.erl index bdc0ed40f3..886ad90e1e 100644 --- a/lib/stdlib/src/sets.erl +++ b/lib/stdlib/src/sets.erl @@ -89,12 +89,12 @@ %%------------------------------------------------------------------------------ %% new() -> Set --spec new() -> set(). +-spec new() -> set(none()). new() -> Empty = mk_seg(?seg_size), #set{empty = Empty, segs = {Empty}}. --spec new([{version, 1..2}]) -> set(). +-spec new([{version, 1..2}]) -> set(none()). new([{version, 2}]) -> #{}; new(Opts) -> -- 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