From 550f3215654906a0446f3a723abf09e85a298beb Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:59:38 +0900 Subject: [PATCH] move the test case added in #50174 to test/core.jl (#55811) Also renames the name of the test function to avoid name collision. --- test/compiler/AbstractInterpreter.jl | 5 ----- test/core.jl | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/compiler/AbstractInterpreter.jl b/test/compiler/AbstractInterpreter.jl index e92b67f980942..bab4fe02a5168 100644 --- a/test/compiler/AbstractInterpreter.jl +++ b/test/compiler/AbstractInterpreter.jl @@ -484,11 +484,6 @@ let NoinlineModule = Module() end end -# Make sure that Core.Compiler has enough NamedTuple infrastructure -# to properly give error messages for basic kwargs... -Core.eval(Core.Compiler, quote f(;a=1) = a end) -@test_throws MethodError Core.Compiler.f(;b=2) - # custom inferred data # ==================== diff --git a/test/core.jl b/test/core.jl index 4db7f0e401fa0..d41a58a7ccb2e 100644 --- a/test/core.jl +++ b/test/core.jl @@ -8288,3 +8288,8 @@ end @test_broken (Tuple{Vararg{T}} where T) === Union{Tuple{T, T, Vararg{T}} where T, Tuple{}, Tuple{T} where T} @test sizeof(Pair{Union{typeof(Union{}),Nothing}, Union{Type{Union{}},Nothing}}(Union{}, Union{})) == 2 + +# Make sure that Core.Compiler has enough NamedTuple infrastructure +# to properly give error messages for basic kwargs... +Core.eval(Core.Compiler, quote issue50174(;a=1) = a end) +@test_throws MethodError Core.Compiler.issue50174(;b=2)