Skip to content

Commit

Permalink
call @macroexpand only in Julia >= 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBreuer committed Sep 6, 2024
1 parent adfa057 commit a5ca60c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ end
GAP.@install function GapObj(x::TestType2) return x.X; end
@test GapObj(TestType2(a)) === a

if VERSION >= v"1.7"
# needs the improved `@macroexpand` from Julia 1.7
@test_throws ErrorException @macroexpand GAP.@install Obj(x::Bool)
@test_throws ErrorException @macroexpand GAP.@install Obj(x::Bool) = x
@test_throws ErrorException @macroexpand GAP.@install GapObj(x::Bool, y::Bool) = x
end
end

0 comments on commit a5ca60c

Please sign in to comment.