Skip to content

fix: remove unreachable code path causing warning#221

Merged
zachdaniel merged 1 commit intoash-project:mainfrom
ahey:fix-warning-unreachable-code-path
Mar 20, 2026
Merged

fix: remove unreachable code path causing warning#221
zachdaniel merged 1 commit intoash-project:mainfrom
ahey:fix-warning-unreachable-code-path

Conversation

@ahey
Copy link
Contributor

@ahey ahey commented Mar 19, 2026

Remove the unreachable code path that was causing the following warning to be shown each time the test suite was run in a project that uses ash_sql under elixir 1.20.0-rc.3-otp-28

warning: the following clause cannot match because the previous clauses already matched all possible values:

     version ->

 it attempts to match on the result of:

     System.get_env("ASH_VERSION")

 which has the already matched type:

     dynamic(nil or binary())

 where "version" was given the type:

     # type: dynamic(nil or binary())
     # from: mix.exs:114:7
     version

 type warning found at:
 │

114 │ version ->
│ ~

└─ mix.exs:114:15: AshSql.MixProject.ash_version/1

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

Remove the unreachable code path that was causing the following warning
to be shown each time the test suite was run in a project that uses
ash_sql under elixir 1.20.0-rc.3-otp-28

warning: the following clause cannot match because the previous clauses already matched all possible values:

         version ->

     it attempts to match on the result of:

         System.get_env("ASH_VERSION")

     which has the already matched type:

         dynamic(nil or binary())

     where "version" was given the type:

         # type: dynamic(nil or binary())
         # from: mix.exs:114:7
         version

     type warning found at:
     │
 114 │       version ->
     │               ~
     │
     └─ mix.exs:114:15: AshSql.MixProject.ash_version/1
@zachdaniel zachdaniel merged commit 8f9f620 into ash-project:main Mar 20, 2026
23 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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