Skip to content

Commit 3365b4e

Browse files
authored
fix typo in issimple filtering in Logging (#38425)
1 parent ef1b6d3 commit 3365b4e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

base/logging.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function issimple(@nospecialize val)
282282
val isa Number && return true
283283
val isa Char && return true
284284
if val isa Expr
285-
val.head === :quote && issimple(val[1]) && return true
285+
val.head === :quote && issimple(val.args[1]) && return true
286286
val.head === :inert && return true
287287
end
288288
return false

test/corelogging.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,8 @@ end
409409
@test record.group == :corelogging # name of this file
410410
end
411411

412+
@testset "complicated kwargs logging macro" begin
413+
@test_logs (:warn, "foo") @warn "foo" argvals=:((DoNotCare{$(Expr(:escape, :Any))}(),))
414+
end
415+
412416
end

0 commit comments

Comments
 (0)