[erlang-patches] Forbid local fun names in Core Erlang guards
Tue Jan 15 11:28:30 CET 2013
Repost on only erlang-patches so that Fredrik's MUA see it ;)
Début du message réexpédié :
> De : Anthony Ramine <>
> Objet : Rép : Local function names in Core Erlang guards
> Date : 11 janvier 2013 17:12:37 HNEC
> À : erlang-bugs Bugs <>, erlang patches <>
> Cc : Bjorn Gustavsson <>
> I wrote a really small patch to forbid local fun variables in Core Erlang guards.
> There is no test case as there is no test suite for core_lint.
> I know the code freeze for R16 is soon but this is really a very small thing.
> git fetch https://github.com/nox/otp.git forbid-locals-in-core-guards
> Anthony Ramine
> Le 19 nov. 2012 à 11:02, Anthony Ramine a écrit :
>> While patching the compiler to allow substitutions of variables which values are
>> local function names , I discovered that core_lint doesn't forbid them in guards,
>> even though that makes the compiler passes further down the road generate badly-formed
>> BEAM code.
>> Is that a bug in core_lint or a bug in the BEAM code generation? Should local function
>> names be allowed in guards?
>> If it is a bug in core_lint, I can make a patch for that; if it is a bug in the BEAM
>> code generation I would love to fix it and remove the code I wrote to avoid the
>> substitution in guards... but I lack knowledge about the BEAM innards.
>>  http://erlang.org/pipermail/erlang-patches/2012-November/003137.html
>> Anthony Ramine
More information about the erlang-patches