ms_transform.erl doesn't handle packages

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Mon Jul 24 13:51:51 CEST 2006


I'm sure this isn't something lots of people have run into,
but when using packages, a call to ets:fun2ms(Fun) must be 
written as .ets:fun2ms(Fun). The parse_transform code needs 
to recognize this form and transform it.

(I know that the package support is undocumented and 
unsupported...)

A diff that fixes the problem is given below.

BR,
Ulf W 


*** OTP_R11B/lib/stdlib-1.14/src/ms_transform.erl Tue May 23 16:03:38
2006
--- ms_transform.erl    Mon Jul 24 13:42:47 2006
***************
*** 297,302 ****
--- 297,306 ----
 
copy({call,Line,{remote,_Line2,{atom,_Line3,ets},{atom,_Line4,fun2ms}},
        As0}) ->
      transform_call(ets,Line,As0);
+ copy({call,Line,{remote,_Line2,{record_field,_Line3,
+                               {atom,_Line4,''},{atom,_Line5,ets}},
+                {atom,_Line6,fun2ms}}, As0}) ->
+     transform_call(ets,Line,As0);
 
copy({call,Line,{remote,_Line2,{atom,_Line3,dbg},{atom,_Line4,fun2ms}},
        As0}) ->
      transform_call(dbg,Line,As0);



More information about the erlang-bugs mailing list