-
Bug
-
Resolution: Done
-
Major
-
1.5.1
-
None
When a MethodExpression is being type checked the type checker considers all overloaded version of the method as implementation candidates for the call. It prunes any candidates by iteratively comparing successive argument types with the corresponding formal types. However, it should actually ensure that the argument type is assignable to the formal type rather than equal to it.
As an example, consider the following built-in call
traceStack("foo", "bar").
Helper implements two possible candidates
traceStack(String prefix, Object key)
and
traceStack(String prefix, int maxFrames)
Clearly the first one should be selected and the second one rejected. In fact, neither is accepted.