[erlang-questions] Preprocessor bug?
Thu Feb 21 04:48:18 CET 2008
I'm not sure if this is a bug or, if it is a bug, it even needs to be
fixed. This code:
f(F,A) when is_function(F,1) ->
f(F,B) when is_function(F,2) ->
compiles and works as expected, unless -compile(inline) is specified.
If -compile(inline) is specified, the compiler dies with "error:
function called with wrong number of arguments!". I would think that
when the pre-processor can't determine at pre-compile time which
clause to run, it just wouldn't run one, but this is a mess I know I'm
getting into when I use -compile(inline), so it might not even matter.
More information about the erlang-questions