You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happens is that promote_rule(Any, Polynomial{true,Any}) returns Any and promote_rule(Polynomial{true,Any}, Any) returns Polynomial{true,Any}, and promote_result keeps calling itself with the exact same type arguments...
This originally came up trying to run MomentClosure.jl with SymbolicUtils version >= 0.12 (expanding some polynomial expressions). I'm currently trying to figure out the intended semantics behind this and trying to find a fix but I thought it might be useful to point it out :)
The text was updated successfully, but these errors were encountered:
Thanks for reporting these. I would find the root cause of what outputed Polynomial{true,Any}. The coefficient type of a polynomial is not supposed to be Any, e.g., we should be able to call zero on it.
Of course, a StackOverflow is still a but, even if the users does not provide the exptected types.
The following causes a StackOverflowError:
Here
Any
can be replaced by various types. Output:What happens is that
promote_rule(Any, Polynomial{true,Any})
returnsAny
andpromote_rule(Polynomial{true,Any}, Any)
returnsPolynomial{true,Any}
, andpromote_result
keeps calling itself with the exact same type arguments...This originally came up trying to run MomentClosure.jl with SymbolicUtils version >= 0.12 (
expand
ing some polynomial expressions). I'm currently trying to figure out the intended semantics behind this and trying to find a fix but I thought it might be useful to point it out :)The text was updated successfully, but these errors were encountered: