Skip to content

Commit

Permalink
fix crash on < 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Aug 20, 2024
1 parent 88e3e43 commit aa2bea7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/elixir_sense/core/metadata_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ defmodule ElixirSense.Core.MetadataBuilder do
Compiler.expand(
ast,
%State{
# TODO remove default when we require elixir 1.15
prematch: Code.get_compiler_option(:on_undefined_variable) || :warn
prematch:
if Version.match?(System.version(), ">= 1.15.0-dev") do
Code.get_compiler_option(:on_undefined_variable)
else
:warn
end
},
Compiler.env()
)
Expand Down

0 comments on commit aa2bea7

Please sign in to comment.