You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>typeBar[X] =Xmatch {
|caseList[a] =>List[Tuple1[a]]
|caseSet[a] =>Set[Tuple1[a]]
| }
scala> (Set(1,2,3), List("a","b")).map([A] => (a: A) => a match {
|caseit: Iterable[x] => it.map(Tuple1(_)).asInstanceOf[Bar[A]]
| })
Crash output (click arrow to expand)
error when pickling typea
error when pickling typeSet[a]
error when pickling type (Set[a], List[String])
error when pickling tree (Set[a], List[String])
error when pickling tree valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
error when pickling tree {
valf:PolyFunction{apply: [A](a: A):Bar[A]} =
{
finalclass$anon() extendsObject(), PolyFunction {
defapply[A>:Nothing<:Any](a: A):Bar[A] =
a match
{
case it @ _:Iterable[x @ _] =>
it.map[Tuple1[x]](
{
def$anonfun(_$2: x):Tuple1[x] =Tuple1.apply[x](_$2)
closure($anonfun)
}
).asInstanceOf[Bar[A]]
}
}
new $anon():PolyFunction{apply: [A](a: A):Bar[A]}
}
valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
runtime.DynamicTuple.dynamicMap[(Tuple_this: (Set[a], List[String])), Bar](
{
Tuple_this
}
,
{
f
}
):Tuple.Map[
{
Tuple_this
}.type
, Bar]
}
error when pickling tree valres4: (Set[Tuple1[Int]], List[Tuple1[String]]) =
{
valf:PolyFunction{apply: [A](a: A):Bar[A]} =
{
finalclass$anon() extendsObject(), PolyFunction {
defapply[A>:Nothing<:Any](a: A):Bar[A] =
a match
{
case it @ _:Iterable[x @ _] =>
it.map[Tuple1[x]](
{
def$anonfun(_$2: x):Tuple1[x] =Tuple1.apply[x](_$2)
closure($anonfun)
}
).asInstanceOf[Bar[A]]
}
}
new $anon():PolyFunction{apply: [A](a: A):Bar[A]}
}
valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
runtime.DynamicTuple.dynamicMap[(Tuple_this: (Set[a], List[String])), Bar](
{
Tuple_this
}
,
{
f
}
):Tuple.Map[
{
Tuple_this
}.type
, Bar]
}
error when pickling tree () extendsObject(), _root_.scala.Serializable { this: rs$line$9.type=>privatedefwriteReplace():AnyRef=new scala.runtime.ModuleSerializationProxy(classOf[rs$line$9.type])
valres4: (Set[Tuple1[Int]], List[Tuple1[String]]) =
{
valf:PolyFunction{apply: [A](a: A):Bar[A]} =
{
finalclass$anon() extendsObject(), PolyFunction {
defapply[A>:Nothing<:Any](a: A):Bar[A] =
a match
{
case it @ _:Iterable[x @ _] =>
it.map[Tuple1[x]](
{
def$anonfun(_$2: x):Tuple1[x] =Tuple1.apply[x](_$2)
closure($anonfun)
}
).asInstanceOf[Bar[A]]
}
}
new $anon():PolyFunction{apply: [A](a: A):Bar[A]}
}
valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
runtime.DynamicTuple.dynamicMap[(Tuple_this: (Set[a], List[String])), Bar
]
(
{
Tuple_this
}
,
{
f
}
):Tuple.Map[
{
Tuple_this
}.type
, Bar]
}
}
error when pickling tree @scala.annotation.internal.SourceFile("rs$line$9") final module classrs$line$9$
(
) extendsObject(), _root_.scala.Serializable { this: rs$line$9.type=>privatedefwriteReplace():AnyRef=new scala.runtime.ModuleSerializationProxy(classOf[rs$line$9.type])
valres4: (Set[Tuple1[Int]], List[Tuple1[String]]) =
{
valf:PolyFunction{apply: [A](a: A):Bar[A]} =
{
finalclass$anon() extendsObject(), PolyFunction {
defapply[A>:Nothing<:Any](a: A):Bar[A] =
a match
{
case it @ _:Iterable[x @ _] =>
it.map[Tuple1[x]](
{
def$anonfun(_$2: x):Tuple1[x] =Tuple1.apply[x](_$2)
closure($anonfun)
}
).asInstanceOf[Bar[A]]
}
}
new $anon():PolyFunction{apply: [A](a: A):Bar[A]}
}
valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
runtime.DynamicTuple.dynamicMap[(Tuple_this: (Set[a], List[String])), Bar
]
(
{
Tuple_this
}
,
{
f
}
):Tuple.Map[
{
Tuple_this
}.type
, Bar]
}
}
error when pickling tree package<empty> {
finallazy module valrs$line$9: rs$line$9$ =new rs$line$9$()
@scala.annotation.internal.SourceFile("rs$line$9") final module class
rs$line$9$
() extendsObject(), _root_.scala.Serializable { this: rs$line$9.type=>privatedefwriteReplace():AnyRef=new scala.runtime.ModuleSerializationProxy(classOf[rs$line$9.type])
valres4: (Set[Tuple1[Int]], List[Tuple1[String]]) =
{
valf:PolyFunction{apply: [A](a: A):Bar[A]} =
{
finalclass$anon() extendsObject(), PolyFunction {
defapply[A>:Nothing<:Any](a: A):Bar[A] =
a match
{
case it @ _:Iterable[x @ _] =>
it.map[Tuple1[x]](
{
def$anonfun(_$2: x):Tuple1[x] =Tuple1.apply[x](_$2)
closure($anonfun)
}
).asInstanceOf[Bar[A]]
}
}
new $anon():PolyFunction{apply: [A](a: A):Bar[A]}
}
valTuple_this: (Set[a], List[String]) =Tuple2.apply[Set[a], List[String]](Set.apply[a]([1,2,3: a]:a*),
List.apply[String](["a","b":String]:String*)
)
runtime.DynamicTuple.dynamicMap[(Tuple_this: (Set[a], List[String])),
Bar
](
{
Tuple_this
}
,
{
f
}
):Tuple.Map[
{
Tuple_this
}.type
, Bar]
}
}
}
Exception in thread "main" java.lang.AssertionError: assertion failed: orphan parameter reference: TypeParamRef(a)
at dotty.DottyPredef$.assertFail(DottyPredef.scala:17)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:279)
at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:152)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType$$anonfun$11$$anonfun$1(TreePickler.scala:169)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType$$anonfun$1(TreePickler.scala:169)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:169)
at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:152)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType$$anonfun$11$$anonfun$1(TreePickler.scala:169)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType$$anonfun$1(TreePickler.scala:169)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:169)
at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:152)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:558)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTpt(TreePickler.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$2(TreePickler.scala:320)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:324)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:509)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$42$$anonfun$1(TreePickler.scala:485)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$18(TreePickler.scala:485)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:487)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTreeUnlessEmpty(TreePickler.scala:308)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$2(TreePickler.scala:322)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:324)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:509)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:343)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:343)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$25(TreePickler.scala:546)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:547)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$2(TreePickler.scala:319)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:324)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:522)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:343)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:343)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$27(TreePickler.scala:556)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:47)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:556)
at dotty.tools.dotc.core.tasty.TreePickler.pickle$$anonfun$1(TreePickler.scala:713)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:713)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$10$$anonfun$8(Pickler.scala:63)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$2(Pickler.scala:87)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:305)
at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:87)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:315)
at scala.collection.immutable.List.map(List.scala:219)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:316)
at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:91)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:167)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
at dotty.tools.dotc.Run.runPhases$5(Run.scala:177)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:185)
at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:64)
at dotty.tools.dotc.Run.compileUnits(Run.scala:192)
at dotty.tools.dotc.Run.compileUnits(Run.scala:134)
at dotty.tools.repl.ReplCompiler.runCompilationUnit(ReplCompiler.scala:156)
at dotty.tools.repl.ReplCompiler.compile(ReplCompiler.scala:166)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:229)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:193)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:127)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:130)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:148)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:130)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala)
minimized code
Crash output (click arrow to expand)
This on the other hand does not crash:
The text was updated successfully, but these errors were encountered: