Skip to content

Commit 87f4d3a

Browse files
authored
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
1 parent f49f46d commit 87f4d3a

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
@@ -585,7 +585,7 @@ julia> v[2]
585585
0x32
586586
```
587587
"""
588-
macro b_str(s)
588+
macro b_str(s::String)
589589
v = codeunits(unescape_string(s))
590590
QuoteNode(v)
591591
end

0 commit comments

Comments
 (0)