JuliaStrings / InlineStrings.jl

Fixed-width string types for Julia
Other
45 stars 13 forks source link

String1("") reports that the the string to too large #73

Closed mkitti closed 3 months ago

mkitti commented 8 months ago
julia> String1("")
ERROR: ArgumentError: string too large (0) to convert to String1
Stacktrace:
 [1] stringtoolong(T::Type, n::Int64)
   @ InlineStrings ~/.julia/packages/InlineStrings/rlLZO/src/InlineStrings.jl:317
 [2] String1(x::String)
   @ InlineStrings ~/.julia/packages/InlineStrings/rlLZO/src/InlineStrings.jl:204
 [3] top-level scope
   @ REPL[32]:1

julia> String1("a")
"a"

"" is not too large. It's actually too small.