I suppose the rationale is that Under LC3 only JS Booleans can be
coerced into a Java Boolean value...

http://www.mozilla.org/js/liveconnect/lc3_method_overloading.html

3.3 Allowed Method Argument Conversions
The following sections detail the allowed conversions of JavaScript
values to Java values when converting arguments for method
invocation.  These rules remain essentially unchanged from earlier
LiveConnect implementations. If a conversion is not specifically
listed below, then it is disallowed.

3.3.2 Boolean
Java argument type      Conversion Technique
boolean                       Map true/false directly to Java
equivalent
java.lang.Boolean
or java.lang.Object        Construct new instance of java.lang.Boolean.
2
java.lang.String            true  ==> "true"
                                  false ==> "false"
...
It's a copout enabling LC3 to not have to define a more complex
precedence of some sort for overloaded method resolution.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to