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