Skip to content

Commit 41b31a6

Browse files
authored
Ensure fieldtypes_cached returns result (#1015)
PR #1013 broke the `visit` tests but didn't fail CI, perhaps due to not having yet merged #1012. This fixes the breakage.
1 parent 05d418d commit 41b31a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/visit.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ function fieldtypes_cached(@nospecialize(type))
6262
@lock types_cache_lock begin
6363
# the equivalent `get!(types_cache, type) do ... end` form is not used because on 1.12 it triggers recompilation
6464
cache = get(types_cache, type, missing)
65-
cache !== missing && return
66-
types_cache[type] = fieldtypes_array(type)
67-
return
65+
cache !== missing && return cache
66+
types_cache[type] = ftypes = fieldtypes_array(type)
67+
return ftypes
6868
end
6969
end
7070

0 commit comments

Comments
 (0)