Matt Bovel
Matt Bovel
Let `tests/run/19569.scala` contain: ```scala class T: def t() = new AnyRef: val x = 0 class C: def g = x ``` Then `scalac -Xprint:flatten tests/run/19569.scala` shows: ```scala class T$$anon$1$C...
Would anyone have insights on what `hasLocalInstantiation` means and do exactly? A comment at call site says `!hasLocalInstantiation(cls) // needs outer because we might not know whether outer is referenced...
Tentative: ```diff diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index f57595293a..5fd506c91d 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -227,7 +227,7 @@ object ExplicitOuter { private def hasLocalInstantiation(cls: ClassSymbol)(using Context): Boolean = // Modules are...
Ah cool, seems to work! It allows removing outer pointers for all Dale's examples (https://github.com/lampepfl/dotty/issues/19569#issuecomment-1921126202) *except T5*.
By the way, we were wondering, are there symbols for which `!o.isStatic && o.isTerm` that are neither methods or anonymous classes (`o.is(Method) || o.isAnonymousClass`)?
#19803 opened.
@Bersier thanks for reporting! Could you please try to compile the same code with `--color never` and report the error message? As Seth wrote, the error seems to happen when...
I haven't been able to minimize this. I tried: ```scala //> using scala 3.4.0 //> using options -rewrite -indent sealed trait Vertex {} sealed trait Edge {} class Graph[+E] {...
This issue was picked for the Scala Issue Spree of April 30th. @mbovel and @aherlihy will be working on it. If you have any insight into the issue or guidance...
Spree team update: @rochala and @aherlihy will work on this tomorrow, via Zoom.