|
Scala example source code file (t2071.scala)
The Scala t2071.scala source code/** * We still have to evaluate whether we will permit existentials * with cross type dependencies. My current reaction would be no. * Ticket stays open until a decision is made. */ trait Iterable[+S] trait Box[U] trait A { type T <: Iterable[S] forSome { type S <: Box[U]; type U } } trait B extends A { type T <: Iterable[S] forSome { type S <: Box[U]; type U } } /* But according to SLS, 3.5.1 Type Equivalence: Two existential types (ยง3.2.10) are equivalent if they have the same number of quantifiers, and, after renaming one list of type quantifiers by another, the quantified types as well as lower and upper bounds of corresponding quantifiers are equivalent. So, every existential type must be equivalent to (and conform to) itself. Attachments */ Other Scala examples (source code examples)Here is a short list of links related to this Scala t2071.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.