error while pickling type $param$1 error when pickling type $param$1 error while pickling type Null(Test.foo) & $param$1 error when pickling type (Null(Test.foo) & $param$1)^ error when pickling tree (Null(Test.foo) & $param$1)^ error when pickling tree Test.ident[(Null(Test.foo) & $param$1)^] error when pickling tree Test.ident[(Null(Test.foo) & $param$1)^](Test.narrow(Test.foo)) error when pickling tree () extends Object() { this: Test.type => def narrow(task: AnyRef): Contra[task.type] = new Contra[Any^](task) def ident[Before](elems: Contra[Before]): Contra[Before] = elems val foo: Null = null Test.ident[(Null(Test.foo) & $param$1)^](Test.narrow(Test.foo)) } error when pickling tree @scala.annotation.internal.SourceFile( "core/src/main/scala/impromptu/framework.scala" ) final module class Test$() extends Object() { this: Test.type => def narrow(task: AnyRef): Contra[task.type] = new Contra[Any^](task) def ident[Before](elems: Contra[Before]): Contra[Before] = elems val foo: Null = null Test.ident[(Null(Test.foo) & $param$1)^](Test.narrow(Test.foo)) } error when pickling tree package { final lazy module val Test: Test$ = new Test$() @scala.annotation.internal.SourceFile( "core/src/main/scala/impromptu/framework.scala" ) final module class Test$() extends Object() { this: Test.type => def narrow(task: AnyRef): Contra[task.type] = new Contra[Any^](task) def ident[Before](elems: Contra[Before]): Contra[Before] = elems val foo: Null = null Test.ident[(Null(Test.foo) & $param$1)^](Test.narrow(Test.foo)) } } exception occurred while compiling core/src/main/scala/impromptu/examples.scala, core/src/main/scala/impromptu/framework.scala Exception in thread "main" java.lang.AssertionError: assertion failed: orphan poly parameter: PolyParam($param$1) at scala.Predef$.assert(Predef.scala:165) at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:269) at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:145) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleNewType$8.apply$mcV$sp(TreePickler.scala:252) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:252) at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:145) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:530) at dotty.tools.dotc.core.tasty.TreePickler.pickleTpt(TreePickler.scala:305) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$2$$anonfun$apply$mcV$sp$4.apply(TreePickler.scala:390) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$2$$anonfun$apply$mcV$sp$4.apply(TreePickler.scala:390) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$2.apply$mcV$sp(TreePickler.scala:390) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:388) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$1.apply$mcV$sp(TreePickler.scala:383) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:382) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleStats$2.apply(TreePickler.scala:342) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleStats$2.apply(TreePickler.scala:342) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:342) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$22.apply$mcV$sp(TreePickler.scala:512) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:493) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleDef$1.apply$mcV$sp(TreePickler.scala:318) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:314) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:483) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleStats$2.apply(TreePickler.scala:342) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleStats$2.apply(TreePickler.scala:342) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:342) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickleTree$24.apply$mcV$sp(TreePickler.scala:528) at dotty.tools.dotc.core.tasty.TreePickler.dotty$tools$dotc$core$tasty$TreePickler$$withLength(TreePickler.scala:30) at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:528) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickle$1.apply(TreePickler.scala:629) at dotty.tools.dotc.core.tasty.TreePickler$$anonfun$pickle$1.apply(TreePickler.scala:629) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:629) at dotty.tools.dotc.transform.Pickler$$anonfun$run$2$$anonfun$apply$1.apply(Pickler.scala:51) at dotty.tools.dotc.transform.Pickler$$anonfun$run$2$$anonfun$apply$1.apply(Pickler.scala:44) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.transform.Pickler$$anonfun$run$2.apply(Pickler.scala:44) at dotty.tools.dotc.transform.Pickler$$anonfun$run$2.apply(Pickler.scala:43) at scala.collection.immutable.List.foreach(List.scala:381) at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:43) at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:283) at dotty.tools.dotc.core.Phases$Phase$$anonfun$runOn$1.apply(Phases.scala:281) at scala.collection.immutable.List.map(List.scala:277) at dotty.tools.dotc.core.Phases$Phase$class.runOn(Phases.scala:281) at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:75) at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:76) at dotty.tools.dotc.Run$$anonfun$compileUnits$1$$anonfun$apply$mcV$sp$1.apply(Run.scala:73) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply$mcV$sp(Run.scala:73) at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67) at dotty.tools.dotc.Run$$anonfun$compileUnits$1.apply(Run.scala:67) at dotty.tools.dotc.util.Stats$.monitorHeartBeat(Stats.scala:76) at dotty.tools.dotc.Run.compileUnits(Run.scala:67) at dotty.tools.dotc.Run.compileSources(Run.scala:64) at dotty.tools.dotc.Run.compile(Run.scala:48) at dotty.tools.dotc.Driver.doCompile(Driver.scala:26) at dotty.tools.dotc.Driver.process(Driver.scala:124) at dotty.tools.dotc.Driver.process(Driver.scala:93) at dotty.tools.dotc.Driver.process(Driver.scala:105) at dotty.tools.dotc.Driver.main(Driver.scala:132) at dotty.tools.dotc.Main.main(Main.scala)