Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inlinestrings fails on Union{Missing, String} with length-1 strings #34

Closed
nilshg opened this issue Jul 5, 2022 · 2 comments · Fixed by #35
Closed

inlinestrings fails on Union{Missing, String} with length-1 strings #34

nilshg opened this issue Jul 5, 2022 · 2 comments · Fixed by #35

Comments

@nilshg
Copy link

nilshg commented Jul 5, 2022

Another length-1 issue:

julia> using InlineStrings, Missings

julia> inlinestrings([missing, "e"])
ERROR: MethodError: no method matching Union{}(::String)
Closest candidates are:
  Union{}(::Any...) at boot.jl:261
  (::Type{T})(::Rational{S}) where {S, T<:AbstractFloat} at rational.jl:114
  (::Type{T})(::Real, ::RoundingMode) where T<:AbstractFloat at rounding.jl:200
  ...
Stacktrace:
 [1] (::Core.TypeofBottom)(a::String)
   @ Core .\boot.jl:261
 [2] _inlinestrings(itr::Vector{Union{Missing, String}}, st::Int64, #unused#::Type{Missing}, IS::Base.HasShape{1}, res::Vector{Missing}, i::Int64)
   @ InlineStrings C:\Users\ngudat\.julia\packages\InlineStrings\7BGwu\src\InlineStrings.jl:886
 [3] inlinestrings(itr::Vector{Union{Missing, String}})
   @ InlineStrings C:\Users\ngudat\.julia\packages\InlineStrings\7BGwu\src\InlineStrings.jl:869
 [4] top-level scope
   @ REPL[8]:1

julia> inlinestrings([missing, "ee"])
2-element Vector{Union{Missing, String3}}:
 missing
 "ee"

(jl_Yp2qxZ) pkg> st
Status `C:\Users\ngudat\AppData\Local\Temp\jl_Yp2qxZ\Project.toml`
  [842dd82b] InlineStrings v1.1.3
@nickrobinson251
Copy link
Collaborator

Thanks for another great bug report!

Hopefully fixed by #35

@nilshg
Copy link
Author

nilshg commented Jul 5, 2022

Thanks for the quick turnaround - trying your branch locally works for me, look forward to the merge & patch release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants