Skip to content

ArgumentError when eval 1. #30

@graham2071

Description

@graham2071
iex> Abacus.compile("1.") 
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not a textual representation of a float

    (erts 13.2.2.10) :erlang.list_to_float('1.')
    (abacus 2.1.0) src/math_term.xrl:41: :math_term.yyaction/5
    (abacus 2.1.0) /Users/tux/.asdf/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:46: :math_term.do_string/5
    (abacus 2.1.0) /Users/tux/.asdf/installs/erlang/27.0/lib/parsetools-2.6/include/leexinc.hrl:30: :math_term.string/5
    (abacus 2.1.0) lib/abacus.ex:110: Abacus.compile/1
    iex:6: (file)

I would expect Abacus.eval/1 to return a parsing error like {:error, ...}, not raising an exception.

Same behaviour with 2.0.0 and 2.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions