Skip to content

Commit

Permalink
fixup! some algorithm layout cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Apr 7, 2023
1 parent 36822a9 commit b76b7d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ for (T, c) in (
(Core.TypeMapEntry, [:sig, :simplesig, :guardsigs, :min_world, :max_world, :func, :isleafsig, :issimplesig, :va]),
(Core.TypeMapLevel, []),
(Core.TypeName, [:name, :module, :names, :atomicfields, :constfields, :wrapper, :mt, :hash, :n_uninitialized, :flags]),
(DataType, [:name, :super, :parameters, :freevars, :instance, :hash]),
(DataType, [:name, :super, :parameters, :instance, :hash]),
(TypeVar, [:name, :ub, :lb]),
)
@test Set((fieldname(T, i) for i in 1:fieldcount(T) if isconst(T, i))) == Set(c)
Expand Down Expand Up @@ -5877,11 +5877,11 @@ function f_unused_undefined_sp(::T...) where T
end
@test_throws UndefVarError(:T) f_unused_undefined_sp()

# note: the constant `6` here should be > DataType.ninitialized.
# note: the constant `5` here should be > DataType.ninitialized.
# This tests that there's no crash due to accessing Type.body.layout.
let f(n) = isdefined(typeof(n), 7)
let f(n) = isdefined(typeof(n), 5)
@test f(0) === false
@test isdefined(Int, 7) === false
@test isdefined(Int, 5) === false
end

# @isdefined in a loop
Expand Down

0 comments on commit b76b7d0

Please sign in to comment.