« Return to Thread: [scala] compound types conformance

Re: [scala] compound types conformance

by Eugene Vigdorchik-2 :: Rate this Message:

Reply to Author | View in Thread

Hello Martin,
I read:
"The member bindings of a type T are all bindings d such that there exists a type
instance of some class C among the base types of T and there exists a definition or
declaration d0 in C such that d results fromd0 by replacing every type T0 in d0 by T0
in C seen from T ."
and:
"The base types of a compound type T1 with . . . with Tn {R } are the reduced
union of the base classes of all Ti 's"
So member bindings for compound type do not include structural declarations according to these definitions?

Eugene.

On Mon, Jul 14, 2008 at 11:31 AM, martin odersky <martin.odersky@...> wrote:
On Mon, Jul 14, 2008 at 9:52 AM, Eugene Vigdorchik
<eugene.vigdorchik@...> wrote:
> When implementing scala plugin for intellij we came across the issue with
> computing conformance relation between compound types. The spec says that
> 1) A compound type T1 with . . . with Tn {R } conforms to each of its
> component
> types Ti .
> 2) If T <:Ui for i = 1, . . . , n and for every binding d of a type or value
> x in R there
> exists a member binding of x in T which subsumes d, then T conforms to the
> compound type U1 with . . . with Un {R }.
>
> Clearly case 1 does not apply for computing conformance for 2 compounds.
> Case 2 does not seem to apply either, since member bindings for compound
> types do not include structural declarations defined in the type.

Hi Eugene,

The intention is that member bindings for compound types *do* include
structural declarations defined in the type. Is there a part in the
spec that led you to believe otherwise?

Cheers

 -- Martin

 « Return to Thread: [scala] compound types conformance

LightInTheBox - Buy quality products at wholesale price!