compiler bug

Bjorn Gustavsson bjorn@REDACTED
Thu Jun 12 10:12:48 CEST 2003


Your program is equivalent to the following program:

h() ->
    if
	true ->
	    1;
	[] =:= true; true ->
	    2
    end.

It is not a bug in the compiler.

/Bjorn

Martin Bjorklund <mbj@REDACTED> writes:

> I just found a compiler bug in R8 and R9:
> 
> ---------------------------------
> -module(h).
> -compile(export_all).
> 
> h() ->
>     if true ->
> 	    1;
>             [];
>        true ->
> 	    2
>     end.
> ---------------------------------
> 
> 
> 1> c(h).
> {ok,h}
> 2> h:h().
> 1
> 
> 
> 
> 
> 
> 
> /martin
> 

-- 
Björn Gustavsson            Ericsson Utvecklings AB
bjorn@REDACTED      ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö



More information about the erlang-questions mailing list