Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
2382-edoc-Fix-unused-type-warning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2382-edoc-Fix-unused-type-warning.patch of Package erlang
From 8cbc1128015cb4cf60b2843d9ed3d239c0ac1b68 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Mon, 9 Aug 2021 14:22:22 +0200 Subject: [PATCH 2/2] edoc: Fix unused type warning This warning was added when we started to check for unused recursive types in 59cc16df4cb0b171e09e38e7924b7d719af1f834. Closed #5094 --- lib/edoc/src/edoc_types.erl | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/edoc/src/edoc_types.erl b/lib/edoc/src/edoc_types.erl index b7d045cbe7..05e321bcee 100644 --- a/lib/edoc/src/edoc_types.erl +++ b/lib/edoc/src/edoc_types.erl @@ -39,9 +39,9 @@ -include("edoc_types.hrl"). -include_lib("xmerl/include/xmerl.hrl"). -%-type t_spec() :: #t_spec{name :: t_name(), -% type :: t_type(), -% defs :: [t_def()]}. +-type t_spec() :: #t_spec{name :: t_name(), + type :: t_fun(), + defs :: [t_def()]}. %% Function specification. -type type() :: t_atom() | t_binary() | t_float() | t_fun() | t_integer() @@ -49,18 +49,18 @@ | t_record() | t_tuple() | t_type() | t_union() | t_var() | t_paren(). -%-type t_typedef() :: #t_typedef{name :: t_name(), -% args :: [type()], -% type :: type() | undefined, -% defs :: [t_def()]}. +-type t_typedef() :: #t_typedef{name :: t_name(), + args :: [type()], + type :: type() | undefined, + defs :: [t_def()]}. %% Type declaration/definition. -%-type t_throws() :: #t_throws{type :: type(), -% defs :: [t_def()]}. +-type t_throws() :: #t_throws{type :: type(), + defs :: [t_def()]}. %% Exception declaration. -%-type t_def() :: #t_def{name :: t_type() | t_var(), -% type :: type()}. +-type t_def() :: #t_def{name :: t_type() | t_var(), + type :: type()}. %% Local definition `name = type'. -type t_name() :: #t_name{app :: [] | atom(), @@ -139,6 +139,7 @@ is_predefined(F, A) -> erl_internal:is_type(F, A). is_new_predefined(_, _) -> false. +-spec to_ref(t_typedef() | t_def() | t_type() | t_name()) -> edoc_refs:t(). to_ref(#t_typedef{name = N}) -> to_ref(N); to_ref(#t_def{name = N}) -> @@ -169,6 +170,8 @@ infer_module_app(#t_name{app = [], module = M} = TName) when is_atom(M) -> infer_module_app(Other) -> Other. +-spec to_xml(type() | t_spec() | t_typedef() | t_def() | t_throws(), + term(), Opts :: proplists:proplist()) -> term(). to_xml(#t_var{name = N}, _Env, _Opts) -> {typevar, [{name, atom_to_list(N)}], []}; to_xml(#t_name{module = [], name = N}, _Env, _Opts) -> -- 2.31.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