From d6322be9aa1f42609c80083ea68eb1dd710f4466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Mon, 19 Nov 2018 02:39:00 +0100 Subject: Fix remote-call error in ms_transform Before this patch the following call resulted in the below error ``` 1> dbg:fun2ms(fun(_) -> m:f() end). Error: Unknown error code {122,m,f} ``` Now it is properly formatted as ``` 1> dbg:fun2ms(fun(_) -> m:f() end). Error: fun containing the remote function call 'm:f/0' (called in body) cannot be translated into match_spec ``` --- lib/stdlib/src/ms_transform.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/stdlib/src/ms_transform.erl') diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl index 6d243e1bec..97ec785c62 100644 --- a/lib/stdlib/src/ms_transform.erl +++ b/lib/stdlib/src/ms_transform.erl @@ -556,8 +556,8 @@ tg({call, Line, {remote,_,{atom,_,erlang},{atom, Line2, FunName}},ParaList}, FunName,length(ParaList)}}) end; tg({call, Line, {remote,_,{atom,_,ModuleName}, - {atom, _, FunName}},_ParaList},B) -> - throw({error,Line,{?ERR_GENREMOTECALL+B#tgd.eb,ModuleName,FunName}}); + {atom, _, FunName}},ParaList},B) -> + throw({error,Line,{?ERR_GENREMOTECALL+B#tgd.eb,ModuleName,FunName,length(ParaList)}}); tg({cons,Line, H, T},B) -> {cons, Line, tg(H,B), tg(T,B)}; tg({nil, Line},_B) -> -- cgit v1.2.3