Skip to content

Commit 4f6c665

Browse files
nsajkoKristofferC
authored andcommitted
Base: macro b_str: restrict argument to String (#57863)
Should make the sysimage less vulnerable to invalidation. As far as I understand this change can't break any code, because: * the macro definition requires `AbstractString` * the way Julia macros work, the argument is either a literal or an `Expr` * `String` is the only `AbstractString` with literals (cherry picked from commit 87f4d3a)
1 parent e2d37cb commit 4f6c665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/strings/io.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ julia> v[2]
589589
0x32
590590
```
591591
"""
592-
macro b_str(s)
592+
macro b_str(s::String)
593593
v = codeunits(unescape_string(s))
594594
QuoteNode(v)
595595
end

0 commit comments

Comments
 (0)