Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad type inference for composition of ImmutablePolynomials #512

Closed
nsajko opened this issue Jul 19, 2023 · 2 comments
Closed

bad type inference for composition of ImmutablePolynomials #512

nsajko opened this issue Jul 19, 2023 · 2 comments

Comments

@nsajko
Copy link
Contributor

nsajko commented Jul 19, 2023

julia> using Test, Polynomials

julia> p = ImmutablePolynomial((1,))
ImmutablePolynomial(1)

julia> @inferred p(p)
ERROR: return type ImmutablePolynomial{Int64, :x, 1} does not match inferred return type Any

Note that the type inference doesn't just fail, it fails completely, that is the inferred return type is Any.

@jverzani
Copy link
Member

I'll have to keep on eye on how to improve this, currently on the WIP PR, I see:

julia> p = ImmutableDensePolynomial{StandardBasis}((3,))
ImmutableDensePolynomial(3)

julia> @inferred p(p)
ERROR: return type ImmutableDensePolynomial{StandardBasis, Int64, :x, 1} does not match inferred return type ImmutableDensePolynomial{StandardBasis, _A, :x} where _A

@nsajko
Copy link
Contributor Author

nsajko commented Aug 15, 2023

Fixed in v4.0.0 🚀

@nsajko nsajko closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants