You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove all mixin traits from Contexts. In particular:
- `newSymbol`, `requiredSymbol` etc, now are available
from Symbols, no `ctx.` prefix needed
- All reporing methods are available from `report` object.
Also:
- Change functions from Context to context functions.
- Add atPhase, atPhaseNoLater, addPhaseNoEarlier and have them replace
most uss of `withPhase`...
- Add inMode, withMode, withoutMode utility wrappers
- Move error messages directly into reporting: this avoids
an annoying import
- Convert old style implicit parameters to `(using Context)`
- Reorganize TyperState.test: Instead of overwriting fields of TyperState, keep test
contexts in an explicit stack, so that they can be re-used. This is simpler and
since there is more decoupling between tests. Usage is now
`Contexts.explore(...)` instead of `ctx.test(...)`.
# Conflicts:
# compiler/src/dotty/tools/dotc/core/Definitions.scala
# Conflicts:
# compiler/src/dotty/tools/dotc/Run.scala
# compiler/src/dotty/tools/dotc/core/Annotations.scala
# compiler/src/dotty/tools/dotc/core/Contexts.scala
# compiler/src/dotty/tools/dotc/core/Definitions.scala
# compiler/src/dotty/tools/dotc/core/Phases.scala
# compiler/src/dotty/tools/dotc/core/TyperState.scala
# compiler/src/dotty/tools/dotc/core/Types.scala
# compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
# compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
# compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
# compiler/src/dotty/tools/dotc/typer/Namer.scala
Copy file name to clipboardExpand all lines: compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
+10-7
Original file line number
Diff line number
Diff line change
@@ -397,16 +397,19 @@ object ExplicitOuter {
397
397
try
398
398
@tailrec defloop(tree: Tree, count: Int):Tree=
399
399
valtreeCls= tree.tpe.widen.classSymbol
400
-
valouterAccessorCtx= ctx.withPhaseNoLater(lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore
401
-
report.log(i"outer to $toCls of $tree: ${tree.tpe}, looking for ${outerAccName(treeCls.asClass)(using outerAccessorCtx)} in $treeCls")
400
+
report.log(i"outer to $toCls of $tree: ${tree.tpe}, looking for ${atPhaseNoLater(lambdaLiftPhase)(outerAccName(treeCls.asClass))} in $treeCls")
i"failure to construct path from ${ctx.owner.ownersIterator.toList}%/% to `this` of ${toCls.showLocated};\n${treeCls.showLocated} does not have an outer accessor")
0 commit comments