Skip to content

Commit 84e0ece

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 e92d94b commit 84e0ece

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
@@ -557,7 +557,7 @@ julia> v[2]
557557
0x32
558558
```
559559
"""
560-
macro b_str(s)
560+
macro b_str(s::String)
561561
v = codeunits(unescape_string(s))
562562
QuoteNode(v)
563563
end

0 commit comments

Comments
 (0)