sean.mcdirmid | 1 Dec 2007 09:04
Picon
Picon
Favicon

Re: 2.6.1-RC1 and Array[].slice

I've thought of a better fix: have Array and Array.Projection 
implement a common supertype Array.ArrayLike and define 
the implicit coercion in Predef on that. Now the code will work 
without the type annotation. I still think zip's argument should
be changed to Iterable or Seq given that there is nothing to gain
from accepting an Array (boxing has to be done regardless). Hmm,
there could be a name clash with an existing zip method, I'll 
look into it.

Sean

Quoting Blair Zajac <blair <at> orcaware.com>:

> Thanks Sean for the description of the issue and the fixes.
> 
> I've opened a ticket to bookmark your suggestion to modify zip().
> 
> http://lampsvn.epfl.ch/trac/scala/ticket/260
> 
> Regards,
> Blair
> 
> sean.mcdirmid <at> epfl.ch wrote:
> > There is an implicit in Predefs that converts array projections into
> arrays
> > by calling force (toArray) automatically. It only works for array
> projections
> > and doesn't work for random access mutable projections. BUT you 
> > are using type inference to combine an array with an array projection,
> 
(Continue reading)


Gmane