On 13 Mai, 16:05, Attila Szegedi <[EMAIL PROTECTED]> wrote:
> Sure. The compiler always chooses the most specific of all applicable
> methods. Both (Object) and (String) are applicable to (null), but
> (String) is more specific, because String extends Object. If you had a
> third override, i.e. isNotEmpty(Integer), you'd get a compiler error
> as both (Integer) and (String) would be applicable, but neither is
> more specific than the other.

Hm, that approach looks quite wrong for the special case 'null'. But
OK, the compiler usually doesn't have the knowledge in advance. Though
Rhino deals with it at call time anyways.

So are there chances that this is added to Rhino? :-)

Thanks,
  Helge
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to