- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
the <:< crasher
Tue, 2010-04-13, 07:33
I don't know how to track this any further, so here you go:
% scala -optimise
scala> def foo = Stream.range(1, 1000) flatMap (x => Some(x))
Exception in thread "main" java.lang.AssertionError: assertion failed: could not find toMap: (x$1: scala.collection.TraversableOnce,x$2: Predef$<:<)scala.collection.immutable.Map
(x$1: scala.collection.TraversableOnce,x$2: Predef$<:<)scala.collection.immutable.Mapinside: List(constructor TraversableOnce$class)
The assertion failing is trying to find the toMap method. It's in
there, and it looks like the same method, but scala denies this since it
feels that the <:< parameter in TraversableOnce is not =:= to the <:<
parameter it's seeking.
It feels like it must be a consequence of specialization but I don't
have the mad skillz necessary to grok that in one day.
On Tue, Apr 13, 2010 at 8:32 AM, Paul Phillips <paulp@improving.org> wrote:
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais