Skip to content

Commit 64d6d3d

Browse files
authored
Fix typo in meta key name in elixir_quote (#13570)
It seems the bug has been introduced in df64d5c (and 169595f) where `import` meta has been renamed to `imports` but some places were missed This bug was present since 1.14.0
1 parent d11b41f commit 64d6d3d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5543,7 +5543,7 @@ defmodule Kernel do
55435543

55445544
# Calls to Kernel functions must be fully-qualified to ensure
55455545
# reproducible builds, otherwise, this macro will generate ASTs
5546-
# with different metadata (:import, :context) depending on if
5546+
# with different metadata (:imports, :context) depending on if
55475547
# it is the bootstrapped version or not.
55485548
Elixir.Kernel.@(impl(true))
55495549

lib/elixir/src/elixir_quote.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ do_quote(Other, _, _) ->
397397
Other.
398398

399399
import_meta(Meta, Name, Arity, Q, E) ->
400-
case (keyfind(import, Meta) == false) andalso
400+
case (keyfind(imports, Meta) == false) andalso
401401
elixir_dispatch:find_imports(Meta, Name, E) of
402402
[] ->
403403
case (Arity == 1) andalso keyfind(ambiguous_op, Meta) of

lib/elixir/test/elixir/kernel/expansion_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ defmodule Kernel.ExpansionTest do
11501150
fn -> 17 end
11511151
end
11521152

1153-
assert clean_meta(expand(before_expansion), [:import, :context, :no_parens]) ==
1153+
assert clean_meta(expand(before_expansion), [:imports, :context, :no_parens]) ==
11541154
after_expansion
11551155
end
11561156

0 commit comments

Comments
 (0)