Skip to content

Commit

Permalink
move struct to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Sep 26, 2023
1 parent 85807a7 commit 6ff71ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/rulesets/Base/indexing.jl
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 6ff71ee

Please sign in to comment.