-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
strings"Strings!""Strings!"
Description
I just realized this on Julia 1.1 as well as master:
julia> copy("I want to be copied")
ERROR: MethodError: no method matching copy(::String)
Closest candidates are:
copy(::Expr) at expr.jl:36
copy(::Core.CodeInfo) at expr.jl:64
copy(::BitSet) at bitset.jl:46
...
Stacktrace:
[1] top-level scope at REPL[3]:1
I was wondering if this is desired behavior or would if it would be ok to define copy(s::String)=s since Strings are immutable.
Metadata
Metadata
Assignees
Labels
strings"Strings!""Strings!"