File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
lib/elixir/test/elixir/kernel Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -373,14 +373,17 @@ defmodule Kernel.WarningTest do
373373 purge Sample
374374 end
375375
376- test "duplicate map keys" do
377- assert capture_err ( fn ->
378- defmodule DuplicateKeys do
379- assert % { a: :b , a: :c } == % { a: :c }
380- assert % { 1 => 2 , 1 => 3 } == % { 1 => 3 }
381- assert % { :a => :b , a: :c } == % { a: :c }
382- end
383- end ) =~ "key :a will be overridden in map"
376+ # TODO: Remove this check once we depend only on 19
377+ if :erlang . system_info ( :otp_release ) >= '20' do
378+ test "duplicate map keys" do
379+ assert capture_err ( fn ->
380+ defmodule DuplicateKeys do
381+ assert % { a: :b , a: :c } == % { a: :c }
382+ assert % { 1 => 2 , 1 => 3 } == % { 1 => 3 }
383+ assert % { :a => :b , a: :c } == % { a: :c }
384+ end
385+ end ) =~ "key :a will be overridden in map"
386+ end
384387 end
385388
386389 test "unused guard" do
You can’t perform that action at this time.
0 commit comments