exercism/elixir

Rational Numbers "abs"/1 function is colliding with Kernel.abs/1

jonathan-soifer opened this issue ยท 1 comments

Hi,

I believe the title is self-explanatory ๐Ÿ˜…

I'm trying to complete the exercise called "Rational Numbers" but I'm getting the following error when running the tests:

We received the following error when we ran your code:

Compiling 1 file (.ex)
error: imported Kernel.abs/1 conflicts with local function
โ”‚
73 โ”‚ def abs(a) do
โ”‚ ^
โ”‚
โ””โ”€ lib/rational_numbers.ex:73:7: RationalNumbers (module)

== Compilation error in file lib/rational_numbers.ex ==
** (CompileError) lib/rational_numbers.ex: cannot compile module RationalNumbers (errors have been logged)

Should we rename this function and the related test?

Making the calls to Kernel.abs/1 namespacing them solved this