Skip to content

Commit 5206f93

Browse files
committed
Avoid specialization in logging
1 parent 1da1b8d commit 5206f93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/logging.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ end
391391
end
392392

393393
function with_logstate(f::Function, logstate)
394+
@nospecialize
394395
t = current_task()
395396
old = t.logstate
396397
try
@@ -401,7 +402,6 @@ function with_logstate(f::Function, logstate)
401402
end
402403
end
403404

404-
405405
#-------------------------------------------------------------------------------
406406
# Control of the current logger and early log filtering
407407

@@ -502,7 +502,7 @@ with_logger(logger) do
502502
end
503503
```
504504
"""
505-
with_logger(f::Function, logger::AbstractLogger) = with_logstate(f, LogState(logger))
505+
with_logger(@nospecialize(f::Function), logger::AbstractLogger) = with_logstate(f, LogState(logger))
506506

507507
"""
508508
current_logger()

0 commit comments

Comments
 (0)