Skip to content

Promotion of Irrational{s} with Complex{Irrational{s}} gives StackOverflowError #51001

Closed

Description

image

The promote_rule with an Irrational{s} type and a Complex{Irrational{s}} type (where s is the same Symbol) gives a StackOverflowError. The intended type is probably Complex{Irrational{s}}, as demonstrated by swapping the arguments:

image

If the parameters are different (e.g. Irrational{:ℯ} with Complex{Irrational{:π}}), then there is no issue as it promotes to ComplexF64.


Julia version 1.9.2 installed on Windows 11 with the Julia installer https://julialang.org/downloads/

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

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcomplexComplex numbers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions