From 6ff71ee2376595fc36854f07be5d24bf084d626b Mon Sep 17 00:00:00 2001 From: Frames White Date: Tue, 26 Sep 2023 22:14:11 +0800 Subject: [PATCH] move struct to top level --- test/rulesets/Base/indexing.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/rulesets/Base/indexing.jl b/test/rulesets/Base/indexing.jl index c21bb8425..a677df3b9 100644 --- a/test/rulesets/Base/indexing.jl +++ b/test/rulesets/Base/indexing.jl @@ -1,9 +1,11 @@ +struct FooTwoField + x::Float64 + y::Float64 +end + + @testset "getfield" begin - struct Foo - x::Float64 - y::Float64 - end - test_frule(getfield, Foo(1.5, 2.5), :x, check_inferred=false) + test_frule(getfield, FooTwoField(1.5, 2.5), :x, check_inferred=false) test_frule(getfield, (; a=1.5, b=2.5), :a, check_inferred=false) test_frule(getfield, (; a=1.5, b=2.5), 2)