Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
0217-edlin_expand-Fix-expansion-of-zero-arity-f...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0217-edlin_expand-Fix-expansion-of-zero-arity-functions.patch of Package erlang
From 28a5b71aa15f091480f43e0f47a67a4a765975b8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Fri, 12 Apr 2024 10:45:04 +0200 Subject: [PATCH 1/3] edlin_expand: Fix expansion of zero-arity functions fixes #8364 --- lib/stdlib/src/edlin_expand.erl | 2 +- lib/stdlib/test/edlin_expand_SUITE.erl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl index 8ed43cd5ef..b385b6b40c 100644 --- a/lib/stdlib/src/edlin_expand.erl +++ b/lib/stdlib/src/edlin_expand.erl @@ -480,7 +480,7 @@ expand_function_parameter_type(Mod, MFA, FunType, Args, Unfinished, Nestings, FT end, case match_arguments(TypeTree, Args) of false -> {no, [], []}; - true when Parameters == [] -> {yes, ")", [#{title=>MFA, elems=>[")"], options=>[]}]}; + true when Parameters == [] -> {yes, ")", [#{title=>MFA, elems=>[{")",[]}], options=>[]}]}; true -> Parameter = lists:nth(length(Args)+1, Parameters), {T, _Name} = case Parameter of diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl index 4b8f659a3c..dcd9a19b39 100644 --- a/lib/stdlib/test/edlin_expand_SUITE.erl +++ b/lib/stdlib/test/edlin_expand_SUITE.erl @@ -259,6 +259,10 @@ function_parameter_completion(Config) -> {no, [], [#{elems:=[#{elems:=[#{elems:=[{"any()",[]},{"[any() | [Deeplist]]",[]}]}]}]}]} = do_expand("complete_function_parameter:a_deeplist_fun("), {no,[],[#{title:="typespecs", elems:=[#{title:= + "complete_function_parameter:multi_arity_fun()", + options:=[], + elems:=[{")",[]}]}, + #{title:= "complete_function_parameter:multi_arity_fun(T1)", elems:=[#{title:="types", elems:=[{"integer()",[]}], @@ -269,11 +273,7 @@ function_parameter_completion(Config) -> elems:=[#{title:="types", elems:=[{"integer()",[]}], options:=[{hide,title}]}], - options:=[{highlight_param,1}]}, - #{title:= - "complete_function_parameter:multi_arity_fun()", - options:=[], - elems:=[")"]}], + options:=[{highlight_param,1}]}], options:=[highlight_all]}]} = do_expand("complete_function_parameter:multi_arity_fun("), {no, [], [#{elems:=[#{elems:=[#{elems:=[{"true",[]},{"false",[]}]}]}]}]} = do_expand("complete_function_parameter:multi_arity_fun(1,"), {no,[], -- 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