Skip to content

tryparse does not work #71

Description

@Wynand

Code to test, using Julia 1.6.6 and FixedPointDecimals 0.4.0:

julia> using FixedPointDecimals

julia> tryparse(FixedDecimal{Int64,2},"1.5")
ERROR: MethodError: no method matching tryparse(::Type{FixedDecimal{Int64, 2}}, ::String)
Closest candidates are:
  tryparse(::Type{Complex{S}}, ::AbstractString) where S<:Real at parse.jl:384
  tryparse(::Type{T}, ::AbstractString) where T<:Dates.TimeType at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:288
  tryparse(::Type{T}, ::AbstractString, ::Dates.DateFormat) where T<:Dates.TimeType at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:288
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[2]:1

julia>

It might be useful to look at the base implementation of parse to fix this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions