Skip to content

Un-breaking functions requiring <:Real #66

@cscherrer

Description

@cscherrer

Now that StaticFloat64 <: Real is false, lots of functions that are defined independently of Static.jl are breaking. More concretely, suppose

foo(x::Real)

is defined in a package that does not depend on Static.jl. Passing a StaticFloat64 to foo now throws an MethodError.

For packages I control, there's an easy fix: Change the constraint to ::Number or remove it altogether. But what's the recommended approach for packages I can't change so easily?

The only easy fix I see is to define a local _foo(x) = foo(x), add a method _foo(::StaticFloat64{x}) where {x}, and then always call _foo. But that seems like a mess, and it will still break downstream when users of my package try to call foo. Any other ideas?

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