Skip to content

Commit

Permalink
fix tests on < 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Sep 27, 2024
1 parent 1bd3715 commit ae2654b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/elixir_sense/core/compiler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1943,8 +1943,16 @@ defmodule ElixirSense.Core.Compiler do
# defmodule automatically defines aliases, we need to mirror this feature here.

# defmodule Elixir.Alias
defp alias_defmodule({:__aliases__, _, [:"Elixir", _ | _]}, module, env),
do: {module, env}
if Version.match?(System.version(), "< 1.16.0-dev") do
# see https://github.com/elixir-lang/elixir/pull/12451#issuecomment-1461393633
defp alias_defmodule({:__aliases__, meta, [:"Elixir", t] = x}, module, env) do

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1948 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)
alias = String.to_atom("Elixir." <> Atom.to_string(t))
{:ok, env} = NormalizedMacroEnv.define_alias(env, meta, alias, as: alias, trace: false)
{module, env}
end
end

defp alias_defmodule({:__aliases__, _, [:"Elixir", _ | _] = x}, module, env), do: {module, env}

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 22.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.15.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.13.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test (Elixir 1.14.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 22.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 24.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.15.x | Erlang/OTP 26.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 23.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.14.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 1955 in lib/elixir_sense/core/compiler.ex

View workflow job for this annotation

GitHub Actions / mix test windows (Elixir 1.13.x | Erlang/OTP 25.x)

variable "x" is unused (if the variable is not meant to be used, prefix it with an underscore)

# defmodule Alias in root
defp alias_defmodule({:__aliases__, _, _}, module, %{module: nil} = env),
Expand Down

0 comments on commit ae2654b

Please sign in to comment.