Skip to content

Implementing fallback methods for checked_* #7

Closed
@kimikage

Description

@kimikage

Since Base.Checked originally targets integer arithmetic, no fallback is provided for non-integer types.
https://github.com/JuliaLang/julia/blob/d84cd4d5ff0e7a51ae5ad4c1a9ac7b2999bd242e/base/checked.jl#L18-L30

It is easy to get method errors for user-/package-defined types because @checked replaces operators regardless of the existence of the methods.

Of course, it's unsafe to fall back to unchecked methods, but this seems to be a necessary measure for convenience.

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