Skip to content

Commit 3fd3cfd

Browse files
committed
chore: enable public binding test only on 1.12
1 parent 08889aa commit 3fd3cfd

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

test/runtests.jl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,22 +2173,24 @@ end
21732173
end
21742174

21752175
@testset "correctly mark public bindings" begin
2176-
let cst = parse_and_pass("""
2177-
module TopModule
2178-
abstract type T end
2179-
struct Foo <: T end
2180-
export T
2181-
public Foo
2176+
if VERSION >= v"1.12"
2177+
let cst = parse_and_pass("""
2178+
module TopModule
2179+
abstract type T end
2180+
struct Foo <: T end
2181+
export T
2182+
public Foo
21822183
2183-
module SubModule
2184-
using ..TopModule
2185-
T
2186-
TopModule.Foo
2187-
end
2184+
module SubModule
2185+
using ..TopModule
2186+
T
2187+
TopModule.Foo
2188+
end
21882189
2189-
end""")
2190-
@test refof(cst.args[1].args[3].args[3].args[3].args[2]) !== nothing
2191-
@test refof(cst.args[1].args[3].args[4].args[1]).is_public
2192-
@test StaticLint.refof(cst.args[1].args[3].args[5].args[3].args[3].args[2].args[1]).is_public
2190+
end""")
2191+
@test refof(cst.args[1].args[3].args[3].args[3].args[2]) !== nothing
2192+
@test refof(cst.args[1].args[3].args[4].args[1]).is_public
2193+
@test StaticLint.refof(cst.args[1].args[3].args[5].args[3].args[3].args[2].args[1]).is_public
2194+
end
21932195
end
21942196
end

0 commit comments

Comments
 (0)