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
you are right, in this case we could do backward analysis to come up with best-constraints for arguments. That would resolve such cases. It is however non trivial to do this inter-procedurally, (with e.g. recursive functions).
The only way currently is to solve this by annotating the function that it takes a numeric argument.
CaptainEmerson
pushed a commit
to SoftwareEngineeringToolDemos/FSE-2010-Phantm
that referenced
this issue
Jun 24, 2016
When inferring types within a function, those should be used to compute the type signature of the function. For example
gives the error
Notice: Type mismatch: expected: Numeric, found: Any
return $foo + 2;
However, the type inferencer should detect that in this case foo receives a numeric argument and enforce it later.
The text was updated successfully, but these errors were encountered: