From 85709517be408f32cf102234b906f3d918fafdf2 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 28 Feb 2023 12:26:50 +0100 Subject: [PATCH] add a type assert to logging to prevent Base.require invalidation (#48810) --- base/logging.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/logging.jl b/base/logging.jl index dd45d05a084af..c2f243bcabf46 100644 --- a/base/logging.jl +++ b/base/logging.jl @@ -445,7 +445,7 @@ function default_group_code(file) QuoteNode(default_group(file)) # precompute if we can else ref = Ref{Symbol}() # memoized run-time execution - :(isassigned($ref) ? $ref[] : $ref[] = default_group(something($file, ""))) + :(isassigned($ref) ? $ref[] : $ref[] = default_group(something($file, ""))::Symbol) end end