[erlang-questions] compiler bug not quite fixed?

Bjorn Gustavsson <>
Thu Sep 14 10:28:20 CEST 2006


Thanks for the bug report.

I forgot to handle nested funs in the after block.

The following correction will be included in R11B-2:

*** v3_core.erl@@/main/release/r11b_patch/1	Tue Aug 29 11:48:16 2006
--- v3_core.erl	Thu Sep 14 10:14:32 2006
***************
*** 1386,1393 ****
  
  %% Kill the id annoations for any fun inside the expression.
  %% Necessary when duplicating code in try ... after.
! kill_id_anns(#ifun{}=Fun) ->
!     Fun#ifun{id=[]};
  kill_id_anns(#a{}=A) ->
      %% Optimization: Don't waste time searching for funs inside annotations.
      A;
--- 1386,1395 ----
  
  %% Kill the id annoations for any fun inside the expression.
  %% Necessary when duplicating code in try ... after.
! 
! kill_id_anns(#ifun{clauses=Cs0}=Fun) ->
!     Cs = kill_id_anns(Cs0),
!     Fun#ifun{clauses=Cs,id=[]};
  kill_id_anns(#a{}=A) ->
      %% Optimization: Don't waste time searching for funs inside annotations.
      A;


/Bjorn

Tim Rath <> writes:

> Hi,
> 
> I saw a compiler bug posted to the list by Martin Bjorklund that appeared to be exactly the problem I'm seeing, and then noticed that this was fixed in R11B-1 (as per the release notes.) Unfortunately, though R11B-1 appears to fix the code submitted by Martin, it does not fix my case.
[...]

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB




More information about the erlang-questions mailing list