Closed
Description
The following,
trait Foo { def next: Foo }
inline implicit def foo(implicit loop: => Foo): Foo = new Foo { def next = loop }
def summon(implicit f: Foo) = ()
summon
crashes the compiler with,
Exception in thread "main" java.lang.AssertionError: assertion failed: failure to
construct path from method next/anonymous class Object with Test1.Foo{...}/value
<local Test1$>/object Test1/package <empty>/package <root> to `this` of
class $_lazy_implicit_$2;
anonymous class Object with Test1.Foo{...} does not have an outer accessor
This is the inlining equivalent of a similar interaction between by-name implicits and macros in scalac and reported and fixed here: scala/scala#7199.
The Dotty fix is quite similar ... PR incoming.