Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation error with Elixir 1.18 #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevencch99
Copy link

I ran into this warning while adapting Elixir 1.18 for my project. I hope this PR could help others who are facing the same issue as me.

My env:

  • macOS 14.4.1 (23E224)
  • Erlang/OTP 27 [erts-15.1.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
  • Elixir 1.18.0 (compiled with Erlang/OTP 27)
warning: Range.new/2 and first..last default to a step of -1 when last < first. Use Range.new(first, last, -1) or first..last//-1, or pass 1 if that was your intention
  (assertions 0.20.1) lib/assertions/comparisons.ex:16: Assertions.Comparisons.compare_lists/3
  (assertions 0.20.1) lib/assertions/comparisons.ex:7: Assertions.Comparisons.compare_maps/3

@nathany-copia
Copy link

Thanks. Seeing this same compiler warning intermingled in the test run.

warning: Range.new/2 and first..last default to a step of -1 when last < first. Use Range.new(first, last, -1) or first..last//-1, or pass 1 if that was your intention
  (assertions 0.20.1) lib/assertions/comparisons.ex:16: Assertions.Comparisons.compare_lists/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants