On 06/09/2011 10:20 PM, Neal Gafter wrote:
On Thu, Jun 9, 2011 at 12:03 PM, Charles Oliver Nutter <[email protected] <mailto:[email protected]>> wrote:

    On Thu, Jun 9, 2011 at 1:11 PM, Attila Szegedi <[email protected]
    <mailto:[email protected]>> wrote:

        The question however is whether these solutions we perceive as
        intuitive can indeed be formally valid under some set of
        consistent rules, without running into a contradiction.


    In answer to you and Neal, it seems there's a simple way to
    improve the spec to provide the "intuitive" result (or at least
    the result most people here seem to find intuitive: treat
    primitives as more specific than Object (and potentially over
    boxed numeric types as well). My (mis)interpretation of the Java
    spec for Mirah's compiler works this way currently; primitives are
    given priority over reference types unconditionally, since the
    alternative *requires* a boxing conversion. If you have to walk
    through a conversion to get there, you're walking into a
    less-specific signature.


The "old" javac algorithm treated boxing and unboxing conversions symmetrically. But you cannot have both int more specific than Integer and vice versa.

You can, just consider int and Integer has the same node:
  int <= Integer && int >= Integer because int == Integer

Rémi

--
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to