Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typechecking of selection in an application with inaccessilble error in an argument throws compiler into SOE #11528

Open
retronym opened this issue May 13, 2019 · 2 comments

Comments

Projects
None yet
1 participant
@retronym
Copy link
Member

commented May 13, 2019

class Test {
  trait C[B] {
    protected def apply(a: Any): B = ???
  }

  def mkCatcher[T](f: Any => T): C[T] = ???

  implicit def view[T](pf: C[T])(implicit i: DummyImplicit): C[T] = mkCatcher(pf.apply)
}

The loop is caused by this retry:

https://github.com/scala/scala/blob/2ef2f9f9658793d511270e9c7b71d2cb5e72421c/src/compiler/scala/tools/nsc/typechecker/Typers.scala#L5232

	at scala.reflect.internal.Trees.itraverse$(Trees.scala:1576)
	at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:28)
	at scala.reflect.internal.SymbolTable.itraverse(SymbolTable.scala:28)
	at scala.reflect.api.Trees$Traverser.traverse(Trees.scala:2497)
	at scala.tools.nsc.typechecker.Typers$Typer$QualifierTraverser.traverse(Typers.scala:5998)
	at scala.tools.nsc.typechecker.Typers$Typer$QualifierTraverser.traverse(Typers.scala:5985)
	at scala.reflect.api.Trees$Traverser.apply(Trees.scala:2535)
	at scala.tools.nsc.typechecker.Typers$Typer.checkRootOfQualifier(Typers.scala:5983)
	at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5951)
	at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5959)
	at scala.tools.nsc.typechecker.Typers$Typer.adaptToMember(Typers.scala:1347)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$adaptToMemberWithArgs$7(Typers.scala:1389)
	at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:715)
	at scala.tools.nsc.typechecker.Typers$Typer.adaptToMemberWithArgs(Typers.scala:1389)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5230)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:5232)
	at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5266)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5822)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedArg$1(Typers.scala:3414)
	at scala.tools.nsc.typechecker.Typers$Typer.withCondConstrTyper(Typers.scala:491)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3414)
	at scala.tools.nsc.typechecker.Typers$Typer.typedArgToPoly$1(Typers.scala:3791)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$doTypedApply$25(Typers.scala:3799)
	at scala.reflect.internal.util.Collections.map2(Collections.scala:102)
	at scala.reflect.internal.util.Collections.map2$(Collections.scala:97)
	at scala.reflect.internal.SymbolTable.map2(SymbolTable.scala:28)
	at scala.tools.nsc.typechecker.Typers$Typer.handlePolymorphicCall$1(Typers.scala:3799)
	at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3810)
	at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4950)
	at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4959)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5821)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5838)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:6122)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2368)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5774)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5837)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5931)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3255)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3396)
	at scala.collection.immutable.List.loop$3(List.scala:451)
	at scala.collection.immutable.List.mapConserve(List.scala:476)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3396)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:2050)
	at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1880)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5775)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5837)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5931)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:3255)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typedStats$10(Typers.scala:3396)
	at scala.collection.immutable.List.loop$3(List.scala:451)
	at scala.collection.immutable.List.mapConserve(List.scala:476)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3396)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5475)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5778)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5837)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5867)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5929)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.apply(Analyzer.scala:115)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:451)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.run(Analyzer.scala:104)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1510)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1494)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1486)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1615)
	at scala.tools.nsc.Driver.doCompile(Driver.scala:48)
	at scala.tools.nsc.MainClass.doCompile(Main.scala:30)
	at scala.tools.nsc.Driver.process(Driver.scala:68)
	at scala.tools.nsc.Driver.main(Driver.scala:82)
	at scala.tools.nsc.Main.main(Main.scala)
@retronym

This comment has been minimized.

Copy link
Member Author

commented May 13, 2019

|    |    |-- mkCatcher(pf.apply) : pt=Test.this.C[T] EXPRmode (site: method view in Test)
|    |    |    |-- mkCatcher BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method view in Test)
|    |    |    |    [adapt] [T](f: Any => T)Test.this.C[T] adapted to [T](f: Any => T)Test.this.C[T]
|    |    |    |    \-> (f: Any => T)Test.this.C[T]
|    |    |    |-- pf.apply : pt=Any => T BYVALmode-EXPRmode-POLYmode (site: method view in Test)
|    |    |    |    |-- pf EXPRmode-POLYmode-QUALmode (site: method view in Test)
|    |    |    |    |    \-> pf.type (with underlying type Test.this.C[T])
|    |    |    |    [search #1] start `Test.this.C[T]`, searching for adaptation to pt=pf.type => ?{def apply: ?} (silent: method view in Test) implicits disabled
|    |    |    |    [search #1] considering view
|    |    |    |    |-- view BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method view in Test) implicits disabled
|    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    \-> (pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]
|    |    |    |    solving for (T: ?T)
|    |    |    |    [search #2] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    [search #2] considering i
|    |    |    |    [search #2] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    [adapt] view adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... based on pt pf.type => ?{def apply: ?}
|    |    |    |    [search #1] success inferred value of type pf.type => ?{def apply: ?} is SearchResult(Test.this.view[T], )
|    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    [search #3] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    |    [search #3] considering i
|    |    |    |    |    [search #3] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |-- Test.this.view[T](pf)(i).apply : pt=Any => T BYVALmode-EXPRmode-POLYmode (site: method view in Test)
|    |    |    |    |    [search #4] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=Test.this.C[T] => ?{def apply: ?} (silent: method view in Test) implicits disabled
|    |    |    |    |    [search #4] considering view
|    |    |    |    |    |-- view BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method view in Test) implicits disabled
|    |    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    |    \-> (pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]
|    |    |    |    |    solving for (T: ?T)
|    |    |    |    |    [search #5] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    |    [search #5] considering i
|    |    |    |    |    [search #5] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    |    [adapt] view adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... based on pt Test.this.C[T] => ?{def apply: ?}
|    |    |    |    |    [search #4] success inferred value of type Test.this.C[T] => ?{def apply: ?} is SearchResult(Test.this.view[T], )
|    |    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    |    [search #6] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    |    |    [search #6] considering i
|    |    |    |    |    |    [search #6] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |    |-- Test.this.view[T](Test.this.view[T](pf)(i))(i).apply : pt=Any => T BYVALmode-EXPRmode-POLYmode (site: method view in Test)
|    |    |    |    |    |    [search #7] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=Test.this.C[T] => ?{def apply: ?} (silent: method view in Test) implicits disabled
|    |    |    |    |    |    [search #7] considering view
|    |    |    |    |    |    |-- view BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method view in Test) implicits disabled
|    |    |    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    |    |    \-> (pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]
|    |    |    |    |    |    solving for (T: ?T)
|    |    |    |    |    |    [search #8] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    |    |    [search #8] considering i
|    |    |    |    |    |    [search #8] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    |    |    [adapt] view adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... based on pt Test.this.C[T] => ?{def apply: ?}
|    |    |    |    |    |    [search #7] success inferred value of type Test.this.C[T] => ?{def apply: ?} is SearchResult(Test.this.view[T], )
|    |    |    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    |    |    [search #9] start `[T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.this.C[T]`, searching for adaptation to pt=DummyImplicit (silent: method view in Test) implicits disabled
|    |    |    |    |    |    |    [search #9] considering i
|    |    |    |    |    |    |    [search #9] success inferred value of type DummyImplicit is SearchResult(i, )
|    |    |    |    |    |    |    |-- [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... EXPRmode-POLYmode-QUALmode (silent: method view in Test)
|    |    |    |    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |    |    |    [adapt] [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th... adapted to [T](pf: Test.this.C[T])(implicit i: DummyImplicit)Test.th...
|    |    |    |    |    |    |    \-> Test.this.C[T]
|    |    |    |    |    |    |-- Test.this.view[T](Test.this.view[T](Test.this.view[T](pf)... : pt=Any => T BYVALmode-EXPRmode-POLYmode (site: method view in Test)
|    |    
@retronym

This comment has been minimized.

Copy link
Member Author

commented May 13, 2019

The code that loops was introduced in the fix for #4275. I expect it needs to be made to check that the qualifier is not an ApplyImplicitView tree before trying to adapt with a view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.