Add throw_if_scalar_and_constant_not_zero#1330
Conversation
odow
left a comment
There was a problem hiding this comment.
Needs tests for SingleVariable and AbstractVectorFunction.
Can't they also be simplified to:
throw_if_scalar_and_constant_not_zero(::Any, ::Any) = nothing|
It could but then an invalid call would return |
|
How could it get a method error? And when would a method error be preferable? |
|
If you call it with a scalar function and a vector set. Or with any type like |
|
That should be caught at the original caller? We shouldn't rely on this method to throw a method error. It would violate the MethodError principle. |
|
Since this is a documented function, the user might call this directly in which case it would get the |
Extracted from #1287