Closed
Description
Minimized code
X.scala:
import scala.quoted._
trait CB[T]:
def map[S](f: T=>S): CB[S] = ???
class MyArr[A]:
def map[B](f: A=>B):MyArr[B] = ???
def mapOut[B](f: A=> CB[B]): CB[MyArr[B]] = ???
def flatMap[B](f: A=>MyArr[B]):MyArr[B] = ???
def flatMapOut[B](f: A=>CB[MyArr[B]]):MyArr[B] = ???
def withFilter(p: A=>Boolean): MyArr[A] = ???
def withFilterOut(p: A=>CB[Boolean]): DelayedWithFilter[A] = ???
def map2[B](f: A=>B):MyArr[B] = ???
class DelayedWithFilter[A]:
def map[B](f: A=>B):MyArr[B] = ???
def mapOut[B](f: A=> CB[B]): CB[MyArr[B]] = ???
def flatMap[B](f: A=>MyArr[B]):MyArr[B] = ???
def flatMapOut[B](f: A=>CB[MyArr[B]]): CB[MyArr[B]] = ???
def map2[B](f: A=>B):CB[MyArr[B]] = ???
def await[T](x:CB[T]):T = ???
object CBM:
def pure[T](t:T):CB[T] = ???
def map[T,S](a:CB[T])(f:T=>S):CB[S] = ???
object X:
inline def process[T](inline f:T) = ${
processImpl[T]('f)
}
def processImpl[T:Type](f:Expr[T])(using qctx: QuoteContext):Expr[CB[T]] =
import qctx.reflect._
def transform(term:Term):Term =
term match
case ap@Apply(TypeApply(Select(obj,name),targs),args)
if (name=="map"||name=="flatMap") =>
obj match
case Apply(Select(obj1,"withFilter"),args1) =>
val nObj = transform(obj)
transform(Apply(TypeApply(Select.unique(nObj,name),targs),args))
case _ =>
val nArgs = args.map(x => shiftLambda(x))
val nSelect = Select.unique(obj, name+"Out")
Apply(TypeApply(nSelect,targs),nArgs)
case ap@Apply(Select(obj,"withFilter"),args) =>
val nArgs = args.map(x => shiftLambda(x))
val nSelect = Select.unique(obj, "withFilterOut")
Apply(nSelect,nArgs)
case ap@Apply(TypeApply(Select(obj,"map2"),targs),args) =>
val nObj = transform(obj)
Apply(TypeApply(
Select.unique(nObj,"map2"),
List(Type[Int].unseal)
),
args
)
case Apply(TypeApply(Ident("await"),targs),args) => args.head
case Apply(Select(obj,"=="),List(b)) =>
println("apply == ")
val tb = transform(b).seal.cast[CB[Int]]
val mt = MethodType(List("p"))(_ => List(b.tpe.widen), _ => Type[Boolean].unseal.tpe)
val mapLambda = Lambda(mt, x => Select.overloaded(obj,"==",List(),List(x.head.asInstanceOf[Term]))).seal.cast[Int=>Boolean]
'{ CBM.map($tb)($mapLambda) }.unseal
case Block(stats, last) => Block(stats, transform(last))
case Inlined(x,List(),body) => transform(body)
case l@Literal(x) =>
'{ CBM.pure(${term.seal}) }.unseal
case other =>
throw RuntimeException(s"Not supported $other")
def shiftLambda(term:Term): Term =
term match
case lt@Lambda(params, body) =>
val paramTypes = params.map(_.tpt.tpe)
val paramNames = params.map(_.name)
val mt = MethodType(paramNames)(_ => paramTypes, _ => Type[CB].unseal.tpe.appliedTo(body.tpe.widen) )
val r = Lambda(mt, args => changeArgs(params,args,transform(body)) )
r
case _ =>
throw RuntimeException("lambda expected")
def changeArgs(oldArgs:List[Tree], newArgs:List[Tree], body:Term):Term =
val association: Map[Symbol, Term] = (oldArgs zip newArgs).foldLeft(Map.empty){
case (m, (oldParam, newParam: Term)) => m.updated(oldParam.symbol, newParam)
case (m, (oldParam, newParam: Tree)) => throw RuntimeException("Term expected")
}
val changes = new TreeMap() {
override def transformTerm(tree:Term)(using Context): Term =
tree match
case ident@Ident(name) => association.getOrElse(ident.symbol, super.transformTerm(tree))
case _ => super.transformTerm(tree)
}
changes.transformTerm(body)
transform(f.unseal).seal.cast[CB[T]]
and Main.scala
package x
object Main {
def main(args:Array[String]):Unit =
val arr1 = new MyArr[Int]()
val arr2 = new MyArr[Int]()
val r = X.process{
arr1.withFilter(x => x == await(CBM.pure(1)))
.flatMap(x =>
arr2.withFilter( y => y == await(CBM.pure(2)) ).
map2( y => x + y )
)
}
println("r")
}
Output (click arrow to expand)
java.util.NoSuchElementException: key not found: method $anonfun while traversing <x:Int/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <<x:Int/T>.+:(x: Int/T): Int/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
{ => root / Compile / compileIncremental 3s
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
< => root / Compile / compileIncremental 3s
<<<arr2:x.MyArr/T>.withFilterOut:((p: Function1/T): x.DelayedWithFilter/T)>(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<y:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing def $anonfun(x: Int/T): x.CB/T =
< => root / Compile / compileIncremental 3s
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<y:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
{ => root / Compile / compileIncremental 3s
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<y:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):Function1/T>
}
:Function1/T>
}
:Function1/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
< => root / Compile / compileIncremental 3s
<<<arr1:x.MyArr/T>.withFilterOut:((p: Function1/T): x.DelayedWithFilter/T)>(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<y:Object/T>
)
:Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>
)
:Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
< => root / Compile / compileIncremental 3s
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>)
:
Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing val r: x.CB/T =
< => root / Compile / compileIncremental 3s
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<<<x.CBM:x.CBM[ModuleClass]/T>.pure:((t: Object/T): x.CB/T)>(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<2:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T =
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing <
{ => root / Compile / compileIncremental 3s
val arr1: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val arr2: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val r: x.CB/T =
<
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>):
Boolean/T
>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>
)
:Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
)
:Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(
<2:Int/T>
):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T): x.CB/T
=
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(y: Object/T): x.CB/T
>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
<<println:((x: Object/T): Unit/T)>(<"r":String/T>):Unit/T>
}
:Unit/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing def main(args: String/T[]): Unit/T =
< => root / Compile / compileIncremental 3s
{
val arr1: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val arr2: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val r: x.CB/T =
<
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(<p:Int/T>)
:
Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<x:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(
<2:Int/T>
):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.
JFunction1$mcZI$sp/T
):
dotty.runtime.function.
JFunction1$mcZI$sp/T
>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T):
x.CB/T
=
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:
(y: Object/T): x.CB/T
>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>):
Int/T
>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>):
Function1/T
>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
<<println:((x: Object/T): Unit/T)>(<"r":String/T>):Unit/T>
}
:Unit/T>
java.util.NoSuchElementException: key not found: method $anonfun while traversing extends Object/T {
def <init>(): Unit/T = ompileIncremental 3s
<
{
<<<super:(x.Main : Object/T)>:((): Object/T)>():Object/T>
<():Unit/T>
}
:Unit/T>
private def writeReplace(): Object/T =
<
<
<new scala.runtime.ModuleSerializationProxy/T:
scala.runtime.ModuleSerializationProxy/T
>
:((x$0: Class/T): scala.runtime.ModuleSerializationProxy/T)>
(<classOf[x.Main[ModuleClass]/T]:Class/T>):
scala.runtime.ModuleSerializationProxy/T
>
def main(args: String/T[]): Unit/T =
<
{
val arr1: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val arr2: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val r: x.CB/T =
<
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<x:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(
<2:Int/T>
):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.
JFunction1$mcZI$sp/T
):
dotty.runtime.function.
JFunction1$mcZI$sp/T
>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T):
x.CB/T
=
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:
(y: Object/T): x.CB/T
>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>
)
:Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
)
:Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
<<println:((x: Object/T): Unit/T)>(<"r":String/T>):Unit/T>
}
:Unit/T>
}
java.util.NoSuchElementException: key not found: method $anonfun while traversing @<
< => root / Compile / compileIncremental 3s
<new scala.annotation.internal.SourceFile/T:
scala.annotation.internal.SourceFile/T
>
:((path: String/T): scala.annotation.internal.SourceFile/T)>
(
<"/Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/Main.scala":
("/Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/Main.scala" :
String/T
)
>
):scala.annotation.internal.SourceFile/T> final module class Main[ModuleClass]/T
extends
Object/T {
def <init>(): Unit/T =
<
{
<<<super:(x.Main : Object/T)>:((): Object/T)>():Object/T>
<():Unit/T>
}
:Unit/T>
private def writeReplace(): Object/T =
<
<
<new scala.runtime.ModuleSerializationProxy/T:
scala.runtime.ModuleSerializationProxy/T
>
:((x$0: Class/T): scala.runtime.ModuleSerializationProxy/T)>
(<classOf[x.Main[ModuleClass]/T]:Class/T>):
scala.runtime.ModuleSerializationProxy/T
>
def main(args: String/T[]): Unit/T =
<
{
val arr1: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val arr2: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val r: x.CB/T =
<
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>):
Integer/T
>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<x:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(
<2:Int/T>
):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<y:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.
JFunction1$mcZI$sp/T
):
dotty.runtime.function.
JFunction1$mcZI$sp/T
>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T):
x.CB/T
=
<<$anonfun:((y: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<y:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:
(y: Object/T): x.CB/T
>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):Int/T>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(<x:Object/T>
)
:Int/T>
):x.CB/T>
<closure(<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
)
:Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
<<println:((x: Object/T): Unit/T)>(<"r":String/T>):Unit/T>
}
:Unit/T>
}
java.util.NoSuchElementException: key not found: method $anonfun while traversing <package <x:x/T> {
final lazy module val Main: x.Main[ModuleClass]/T =
<
<<new x.Main[ModuleClass]/T:x.Main[ModuleClass]/T>:
((): x.Main[ModuleClass]/T)
>
():x.Main[ModuleClass]/T>
@<
<
<new scala.annotation.internal.SourceFile/T:
scala.annotation.internal.SourceFile/T
>
:((path: String/T): scala.annotation.internal.SourceFile/T)>
(
<"/Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/Main.scala":
("/Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/Main.scala" :
String/T
)
>
):scala.annotation.internal.SourceFile/T> final module class
Main[ModuleClass]/T
extends Object/T {
def <init>(): Unit/T =
<
{
<<<super:(x.Main : Object/T)>:((): Object/T)>():Object/T>
<():Unit/T>
}
:Unit/T>
private def writeReplace(): Object/T =
<
<
<new scala.runtime.ModuleSerializationProxy/T:
scala.runtime.ModuleSerializationProxy/T
>
:((x$0: Class/T): scala.runtime.ModuleSerializationProxy/T)>
(<classOf[x.Main[ModuleClass]/T]:Class/T>):
scala.runtime.ModuleSerializationProxy/T
>
def main(args: String/T[]): Unit/T =
<
{
val arr1: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val arr2: x.MyArr/T =
<<<new x.MyArr/T:x.MyArr/T>:((): x.MyArr/T)>():x.MyArr/T>
val r: x.CB/T =
<
<
<
<
<<arr1:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(<1:Int/T>
)
:Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<<<x:Int/T>.==:((x: Int/T): Boolean/T)>(
<p:Int/T>
):Boolean/T>
<closure(<$anonfun:(p: Int/T): Boolean/T>:
dotty.runtime.function.JFunction1$mcZI$sp/T
):dotty.runtime.function.JFunction1$mcZI$sp/T>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T
=
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<x:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.flatMapOut:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(x: Int/T): x.CB/T =
<
<
<
<<arr2:x.MyArr/T>.withFilterOut:
((p: Function1/T): x.DelayedWithFilter/T)
>
(
<
{
def $anonfun(y: Int/T): x.CB/T =
<
<<x.CBM:x.CBM[ModuleClass]/T>.map:
((a: x.CB/T, f: Function1/T): x.CB/T)
>
(
<
<<x.CBM:x.CBM[ModuleClass]/T>.pure:
((t: Object/T): x.CB/T)
>
(
<<scala.Int.box:((x: Int/T): Integer/T)>(
<2:Int/T>
):Integer/T>
):x.CB/T>
,
<
{
def $anonfun(p: Int/T): Boolean/T =
<
<<y:Int/T>.==:
((x: Int/T): Boolean/T)
>
(<p:Int/T>):Boolean/T>
<closure(
<$anonfun:(p: Int/T): Boolean/T>
:
dotty.runtime.function.
JFunction1$mcZI$sp/T
):
dotty.runtime.function.
JFunction1$mcZI$sp/T
>
}
:dotty.runtime.function.JFunction1$mcZI$sp/T
>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](y: Object/T):
x.CB/T
=
<<$anonfun:((y: Int/T): x.CB/T)>(
<
<scala.Int.unbox:
((x: Object/T): Int/T)
>
(<y:Object/T>):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:
(y: Object/T): x.CB/T
>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.DelayedWithFilter/T>
.map2:((f: Function1/T): x.CB/T)>
(
<
{
def $anonfun(y: Int/T): Int/T =
<<<x:Int/T>.+:((x: Int/T): Int/T)>(<y:Int/T>):
Int/T
>
<closure(<$anonfun:(y: Int/T): Int/T>:
dotty.runtime.function.JFunction1$mcII$sp/T
):dotty.runtime.function.JFunction1$mcII$sp/T>
}
:dotty.runtime.function.JFunction1$mcII$sp/T>
):x.CB/T>
<
{
def $anonfun[Suffix $adapted](x: Object/T): x.CB/T =
<<$anonfun:((x: Int/T): x.CB/T)>(
<<scala.Int.unbox:((x: Object/T): Int/T)>(
<x:Object/T>
):Int/T>
):x.CB/T>
<closure(
<$anonfun[Suffix $adapted]:(x: Object/T): x.CB/T>
):Function1/T>
}
:Function1/T>
}
:Function1/T>
):x.CB/T>
:x.CB/T:x.CB/T>
<<println:((x: Object/T): Unit/T)>(<"r":String/T>):Unit/T>
}
:Unit/T>
}
}:x.type>
java.util.NoSuchElementException: key not found: method $anonfun while compiling /Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/Main.scala, /Users/rssh/tests/dotty/crash-compiler4/src/main/scala/x/X.scala
[error] ## Exception when compiling 2 sources to /Users/rssh/tests/dotty/crash-compiler4/target/scala-3.0.0-M2/classes
[error] java.util.NoSuchElementException: key not found: method $anonfun
[error] scala.collection.MapOps.default(Map.scala:251)
[error] scala.collection.MapOps.default$(Map.scala:250)
[error] scala.collection.AbstractMap.default(Map.scala:381)
[error] scala.collection.MapOps.apply(Map.scala:153)
[error] scala.collection.MapOps.apply$(Map.scala:152)
[error] scala.collection.AbstractMap.apply(Map.scala:381)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter.narrowLiftedOwner(LambdaLift.scala:99)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter.dotty$tools$dotc$transform$LambdaLift$Lifter$$markFree(LambdaLift.scala:162)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter.dotty$tools$dotc$transform$LambdaLift$Lifter$$markFree(LambdaLift.scala:161)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:212)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1405)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1411)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1480)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1425)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1411)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1480)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1425)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1411)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1419)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1476)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1425)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1480)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1487)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1484)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.apply(Trees.scala:1515)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.fold$1(Trees.scala:1390)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.apply(Trees.scala:1392)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeAccumulator.foldOver(Trees.scala:1491)
[error] dotty.tools.dotc.ast.Trees$Instance$TreeTraverser.traverseChildren(Trees.scala:1516)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter$CollectDependencies.traverse(LambdaLift.scala:250)
[error] dotty.tools.dotc.transform.LambdaLift$Lifter.<init>(LambdaLift.scala:374)
[error] dotty.tools.dotc.transform.LambdaLift.prepareForUnit(LambdaLift.scala:531)
[error] dotty.tools.dotc.transform.MegaPhase.prepUnit(MegaPhase.scala:1040)
[error] dotty.tools.dotc.transform.MegaPhase.transformUnit(MegaPhase.scala:447)
[error] dotty.tools.dotc.transform.MegaPhase.run(MegaPhase.scala:460)
[error] dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:296)
[error] scala.collection.immutable.List.map(List.scala:246)
[error] dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:297)
[error] dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:185)
[error] dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
[error] dotty.tools.dotc.Run.runPhases$5(Run.scala:195)
[error] dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:203)
[error] dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
[error] dotty.tools.dotc.Run.compileUnits(Run.scala:210)
[error] dotty.tools.dotc.Run.compileUnits(Run.scala:152)
[error] dotty.tools.dotc.Driver.finish$1(Driver.scala:48)
[error] dotty.tools.dotc.Driver.doCompile(Driver.scala:51)
[error] dotty.tools.dotc.Driver.process(Driver.scala:195)
[error] dotty.tools.dotc.Main.process(Main.scala)
[error] xsbt.CachedCompilerImpl.run(CachedCompilerImpl.java:69)
[error] xsbt.CompilerInterface.run(CompilerInterface.java:41)
[error] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] java.lang.reflect.Method.invoke(Method.java:498)
[error] sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:330)
[error] sbt.