Skip to content

Name collision in @irrational #43

@hz-xiaxz

Description

@hz-xiaxz

I'm trying to compat https://github.com/jishnub/SphericalHarmonics.jl to IrrationalConstants.jl:0.2.4, however finding this fails.

julia> IrrationalConstants.@irrational _sqrt3by4pi sqrt(3 / (4 * big(pi)))
ERROR: ArgumentError: invalid type for argument  in method definition for #BigFloat#11 at /home/hzxiaxz/.julia/packages/IrrationalConstants/lWTip/src/macro.jl:118
Stacktrace:
 [1] top-level scope
   @ REPL[24]:129
 [2] macro expansion
   @ ~/.julia/packages/IrrationalConstants/lWTip/src/macro.jl:118 [inlined]
 [3] top-level scope
   @ REPL:1

While Base.@irrational still works.

I note there's still implementation difference of the macro here from Base. Should the macro here be updated or I just used the macro wrongly?

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