Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-189

bug in erl_eval:expr/5

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 18.3
    • Fix Version/s: None
    • Component/s: stdlib
    • Labels:
      None

      Description

      Assume X is

      {'if',1,
            [{clause,1,[],
                     [[{op,1,'=:=',{var,1,'Filters'},{nil,1}}]],
                     [{atom,1,true}]},
             {clause,1,[],[[{atom,1,true}]],[{atom,1,false}]}]}
      

      which is the abstract format for

      if Filters =:= [] -> true; true -> false end.
      

      Eval these in EShell to see erl_eval:expr/5 silence on unbound variables:

      1> erl_eval:expr(X, [], none, none, none).
      {value,false,[]}
      
      2) erl_eval:expr(X, [])
      ** exception error: {unbound_var,'Filters'}
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            sdl.web@gmail.com Leo Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: