Skip to content

Commit da5d244

Browse files
committed
Merge branch 'main' into implement/Xlint/shadow_warnings
2 parents 2edd869 + b6e0e9e commit da5d244

File tree

1,680 files changed

+61578
-11746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,680 files changed

+61578
-11746
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134

135135
- name: Cmd Tests
136136
run: |
137-
./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test"
137+
./project/scripts/sbt ";dist/pack; scala3-bootstrapped/compile; scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped-tasty-tests/run ;stdlib-bootstrapped-tasty-tests/test; scala3-compiler-bootstrapped/scala3CompilerCoursierTest:test"
138138
./project/scripts/cmdTests
139139
./project/scripts/bootstrappedOnlyCmdTests
140140
@@ -255,6 +255,11 @@ jobs:
255255
run: |
256256
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; stdlib-bootstrapped/mimaReportBinaryIssues"
257257
258+
- name: TASTy MiMa
259+
run: |
260+
# This script cleans the compiler and recompiles it from scratch (keep as last run)
261+
./project/scripts/stdlib-bootstrapped-tasty-mima.sh
262+
258263
community_build_a:
259264
runs-on: [self-hosted, Linux]
260265
container:
@@ -488,7 +493,7 @@ jobs:
488493

489494
- name: Test
490495
run: |
491-
./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
496+
./project/scripts/sbt ";dist/pack ;scala3-bootstrapped/compile ;scala3-bootstrapped/test ;sbt-test/scripted scala2-compat/* ;stdlib-bootstrapped-tasty-tests/run ;stdlib-bootstrapped-tasty-tests/test"
492497
./project/scripts/cmdTests
493498
./project/scripts/bootstrappedOnlyCmdTests
494499

.github/workflows/spec.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Specification
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches-ignore:
8+
- 'gh-readonly-queue/**'
9+
pull_request:
10+
merge_group:
11+
workflow_dispatch:
12+
13+
env:
14+
DOTTY_CI_RUN: true
15+
16+
jobs:
17+
specification:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: ./docs/_spec
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
# Keep in sync with ./docs/_spec/Dockerfile
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: '2.7'
30+
- name: Install required gems
31+
run: |
32+
gem update --system
33+
gem install sass-embedded -v 1.58.0
34+
gem install bundler:1.17.2 jekyll
35+
bundle install
36+
npm install bower
37+
38+
- name: Build the specification
39+
run: |
40+
bundle exec jekyll build
41+
42+
# Deploy
43+
- name: Deployment
44+
env:
45+
USER_FOR_TEST: ${{ secrets.SPEC_DEPLOY_USER }}
46+
if: ${{ env.USER_FOR_TEST != '' }}
47+
uses: burnett01/rsync-deployments@6.0.0
48+
with:
49+
switches: -rzv
50+
path: docs/_spec/_site/
51+
remote_path: ${{ secrets.SPEC_DEPLOY_PATH }}
52+
remote_host: ${{ secrets.SPEC_DEPLOY_HOST }}
53+
remote_user: ${{ secrets.SPEC_DEPLOY_USER }}
54+
remote_key: ${{ secrets.SPEC_DEPLOY_KEY }}
55+
remote_key_pass: ${{ secrets.SPEC_DEPLOY_PASS }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,6 @@ docs/_spec/.jekyll-metadata
9999
# scaladoc related
100100
scaladoc/output/
101101

102+
#coverage
103+
coverage/
104+

.gitmodules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
[submodule "community-build/community-projects/scala-xml"]
2929
path = community-build/community-projects/scala-xml
3030
url = https://github.com/dotty-staging/scala-xml
31-
[submodule "community-build/community-projects/shapeless"]
32-
path = community-build/community-projects/shapeless
33-
url = https://github.com/dotty-staging/shapeless
34-
branch = shapeless-3-staging
3531
[submodule "community-build/community-projects/xml-interpolator"]
3632
path = community-build/community-projects/xml-interpolator
3733
url = https://github.com/dotty-staging/xml-interpolator.git
@@ -222,3 +218,6 @@
222218
[submodule "community-build/community-projects/parboiled2"]
223219
path = community-build/community-projects/parboiled2
224220
url = https://github.com/dotty-staging/parboiled2.git
221+
[submodule "community-build/community-projects/shapeless-3"]
222+
path = community-build/community-projects/shapeless-3
223+
url = https://github.com/dotty-staging/shapeless-3.git

NOTICE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,19 @@ major authors were omitted by oversight.
8989
details.
9090

9191
* dotty.tools.dotc.coverage: Coverage instrumentation utilities have been
92-
adapted from the scoverage plugin for scala 2 [5], which is under the
92+
adapted from the scoverage plugin for scala 2 [4], which is under the
9393
Apache 2.0 license.
9494

95+
* dooty.tools.pc: Presentation compiler implementation adapted from
96+
scalameta/metals [5] mtags module, which is under the Apache 2.0 license.
97+
9598
* The Dotty codebase contains parts which are derived from
96-
the ScalaPB protobuf library [4], which is under the Apache 2.0 license.
99+
the ScalaPB protobuf library [6], which is under the Apache 2.0 license.
97100

98101

99102
[1] https://github.com/scala/scala
100103
[2] https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt
101104
[3] https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt
102-
[4] https://github.com/lampepfl/dotty/pull/5783/files
103-
[5] https://github.com/scoverage/scalac-scoverage-plugin
105+
[4] https://github.com/scoverage/scalac-scoverage-plugin
106+
[5] https://github.com/scalameta/metals
107+
[6] https://github.com/lampepfl/dotty/pull/5783/files

bench-run/src/main/scala/dotty/tools/benchmarks/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ object Bench {
6868
println()
6969
println("Usage:")
7070
println()
71-
println("dotty-bench-run/jmh:run [<warmup>] [<iterations>] [<forks>] <regexp> [<input>|--] [<output>]")
71+
println("scala3-bench-run/jmh:run [<warmup>] [<iterations>] [<forks>] <regexp> [<input>|--] [<output>]")
7272
println()
7373
println("warmup: warmup iterations. defaults to 20.")
7474
println("iterations: benchmark iterations. defaults to 20.")

bench/scripts/collection-vector.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
sbt "dotty-bench-bootstrapped/jmh:run 40 40 3 bench/tests/Vector.scala"
2+
sbt "scala3-bench-bootstrapped/jmh:run 40 40 3 bench/tests/Vector.scala"

bench/scripts/compiler-cold.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
find compiler/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench-bootstrapped/jmh:run 0 1 10" {} + | sbt
2+
find compiler/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "scala3-bench-bootstrapped/jmh:run 0 1 10" {} + | sbt

bench/scripts/compiler.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
find compiler/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench-bootstrapped/jmh:run 5 10" {} + | sbt
2+
find compiler/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "scala3-bench-bootstrapped/jmh:run 5 10" {} + | sbt

bench/scripts/library-cold.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
find library/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench-bootstrapped/jmh:run 0 1 10" {} + | sbt
2+
find library/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "scala3-bench-bootstrapped/jmh:run 0 1 10" {} + | sbt

bench/scripts/library.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
find library/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "dotty-bench-bootstrapped/jmh:run 40 30" {} + | sbt
2+
find library/src/ -type f \( -name "*.scala" -or -name "*.java" \) -exec echo "scala3-bench-bootstrapped/jmh:run 40 30" {} + | sbt

build.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ val `scala3-bench` = Build.`scala3-bench`
1515
val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
1616
val `scala3-bench-micro` = Build.`scala3-bench-micro`
1717
val `stdlib-bootstrapped` = Build.`stdlib-bootstrapped`
18+
val `stdlib-bootstrapped-tasty` = Build.`stdlib-bootstrapped-tasty`
1819
val `stdlib-bootstrapped-tasty-tests` = Build.`stdlib-bootstrapped-tasty-tests`
1920
val `tasty-core` = Build.`tasty-core`
2021
val `tasty-core-bootstrapped` = Build.`tasty-core-bootstrapped`
@@ -28,6 +29,8 @@ val `scala3-bench-run` = Build.`scala3-bench-run`
2829
val dist = Build.dist
2930
val `community-build` = Build.`community-build`
3031
val `sbt-community-build` = Build.`sbt-community-build`
32+
val `scala3-presentation-compiler` = Build.`scala3-presentation-compiler`
33+
val `scala3-presentation-compiler-bootstrapped` = Build.`scala3-presentation-compiler-bootstrapped`
3134

3235
val sjsSandbox = Build.sjsSandbox
3336
val sjsJUnitTests = Build.sjsJUnitTests
Submodule perspective updated 84 files
Lines changed: 0 additions & 1 deletion
This file was deleted.
Submodule shapeless-3 added at d27c5ba
Submodule stdLib213 updated 489 files

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ final case class SbtCommunityProject(
140140
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
141141
case _ => Nil
142142
extraSbtArgs ++ sbtProps ++ List(
143-
"-sbt-version", "1.8.2",
143+
"-sbt-version", "1.9.3",
144144
"-Dsbt.supershell=false",
145145
s"-Ddotty.communitybuild.dir=$communitybuildDir",
146146
s"--addPluginSbtFile=$sbtPluginFilePath"
@@ -366,13 +366,11 @@ object projects:
366366
// sbtDocCommand = "library/doc" // Does no compile? No idea :/
367367
)
368368

369-
370-
lazy val shapeless = SbtCommunityProject(
371-
project = "shapeless",
372-
sbtTestCommand = """set deriving/scalacOptions -= "-Xfatal-warnings"; set typeable/scalacOptions -= "-Xfatal-warnings"; test""",
373-
// selectively disable -Xfatal-warnings due to deprecations
374-
sbtDocCommand = forceDoc("typeable", "deriving", "data"),
375-
scalacOptions = Nil // disable -Ysafe-init, due to -Xfatal-warnings
369+
lazy val shapeless3 = SbtCommunityProject(
370+
project = "shapeless-3",
371+
sbtTestCommand = "testJVM; testJS",
372+
sbtDocCommand = forceDoc("typeable", "deriving"),
373+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), // due to -Xfatal-warnings
376374
)
377375

378376
lazy val xmlInterpolator = SbtCommunityProject(
@@ -682,7 +680,7 @@ object projects:
682680
sbtTestCommand = "runCommunityBuild",
683681
sbtPublishCommand = "publishLocal",
684682
dependencies = List(scalatest),
685-
scalacOptions = List("-language:implicitConversions"), // disabled -Ysafe-init, due to bug in macro
683+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros") :+ "-language:implicitConversions", // disabled -Xcheck-macros, due to bug in macro
686684
)
687685

688686
lazy val onnxScala = SbtCommunityProject(
@@ -796,7 +794,7 @@ def allProjects = List(
796794
projects.minitest,
797795
projects.fastparse,
798796
projects.stdLib213,
799-
projects.shapeless,
797+
projects.shapeless3,
800798
projects.xmlInterpolator,
801799
projects.effpi,
802800
projects.sconfig,

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ class CommunityBuildTestC:
9191
@Test def scalaz = projects.scalaz.run()
9292
@Test def scas = projects.scas.run()
9393
@Test def sconfig = projects.sconfig.run()
94-
@Test def shapeless = projects.shapeless.run()
94+
@Test def shapeless3 = projects.shapeless3.run()
9595
@Test def sourcecode = projects.sourcecode.run()
9696
@Test def specs2 = projects.specs2.run()
97+
9798
@Test def stdLib213 = projects.stdLib213.run()
9899
@Test def ujson = projects.ujson.run()
99100
@Test def upickle = projects.upickle.run()

compiler/src/dotty/tools/MainGenericRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ object MainGenericRunner {
148148
case (o @ javaOption(striped)) :: tail =>
149149
processArgs(tail, settings.withJavaArgs(striped).withScalaArgs(o))
150150
case (o @ scalaOption(_*)) :: tail =>
151-
val remainingArgs = (CommandLineParser.expandArg(o) ++ tail).toList
151+
val remainingArgs = CommandLineParser.expandArg(o) ++ tail
152152
processArgs(remainingArgs, settings)
153153
case (o @ colorOption(_*)) :: tail =>
154154
processArgs(tail, settings.withScalaArgs(o))

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,14 @@ trait BCodeSkelBuilder extends BCodeHelpers {
763763
for (p <- params) { locals.makeLocal(p.symbol) }
764764
// debug assert((params.map(p => locals(p.symbol).tk)) == asmMethodType(methSymbol).getArgumentTypes.toList, "debug")
765765

766-
if (params.size > MaximumJvmParameters) {
766+
val paramsSize = params.map { param =>
767+
val tpeTym = param.symbol.info.typeSymbol
768+
if tpeTym == defn.LongClass || tpeTym == defn.DoubleClass then 2 else 1
769+
}.sum
770+
if (paramsSize > MaximumJvmParameters) {
767771
// SI-7324
768-
report.error(em"Platform restriction: a parameter list's length cannot exceed $MaximumJvmParameters.", ctx.source.atSpan(methSymbol.span))
772+
val info = if paramsSize == params.length then "" else " (Long and Double count as 2)" // https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.3
773+
report.error(em"Platform restriction: a parameter list's length cannot exceed $MaximumJvmParameters$info.", ctx.source.atSpan(methSymbol.span))
769774
return
770775
}
771776

compiler/src/dotty/tools/backend/jvm/CodeGen.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import scala.tools.asm
3030
import scala.tools.asm.tree._
3131
import tpd._
3232
import dotty.tools.io.AbstractFile
33+
import dotty.tools.dotc.util
3334
import dotty.tools.dotc.util.NoSourcePosition
3435

3536

@@ -106,7 +107,7 @@ class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)(
106107
}
107108

108109
// Creates a callback that will be evaluated in PostProcessor after creating a file
109-
private def onFileCreated(cls: ClassNode, claszSymbol: Symbol, sourceFile: interfaces.SourceFile): AbstractFile => Unit = clsFile => {
110+
private def onFileCreated(cls: ClassNode, claszSymbol: Symbol, sourceFile: util.SourceFile): AbstractFile => Unit = clsFile => {
110111
val (fullClassName, isLocal) = atPhase(sbtExtractDependenciesPhase) {
111112
(ExtractDependencies.classNameAsString(claszSymbol), claszSymbol.isLocal)
112113
}
@@ -115,12 +116,9 @@ class CodeGen(val int: DottyBackendInterface, val primitives: DottyPrimitives)(
115116
if (ctx.compilerCallback != null)
116117
ctx.compilerCallback.onClassGenerated(sourceFile, convertAbstractFile(clsFile), className)
117118

118-
if (ctx.sbtCallback != null) {
119-
val jSourceFile = sourceFile.jfile.orElse(null)
120-
val cb = ctx.sbtCallback
121-
if (isLocal) cb.generatedLocalClass(jSourceFile, clsFile.file)
122-
else cb.generatedNonLocalClass(jSourceFile, clsFile.file, className, fullClassName)
123-
}
119+
ctx.withIncCallback: cb =>
120+
if (isLocal) cb.generatedLocalClass(sourceFile, clsFile.jpath)
121+
else cb.generatedNonLocalClass(sourceFile, clsFile.jpath, className, fullClassName)
124122
}
125123

126124
/** Convert a `dotty.tools.io.AbstractFile` into a

compiler/src/dotty/tools/backend/jvm/PostProcessor.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ class PostProcessor(val frontendAccess: PostProcessorFrontendAccess, val bTypes:
2323

2424
def postProcessAndSendToDisk(generatedDefs: GeneratedDefs): Unit = {
2525
val GeneratedDefs(classes, tasty) = generatedDefs
26+
if !ctx.settings.YoutputOnlyTasty.value then
27+
postProcessClassesAndSendToDisk(classes)
28+
postProcessTastyAndSendToDisk(tasty)
29+
}
30+
31+
private def postProcessClassesAndSendToDisk(classes: List[GeneratedClass]): Unit = {
2632
for (GeneratedClass(classNode, sourceFile, isArtifact, onFileCreated) <- classes) {
2733
val bytes =
2834
try
@@ -46,8 +52,10 @@ class PostProcessor(val frontendAccess: PostProcessorFrontendAccess, val bTypes:
4652
if clsFile != null then onFileCreated(clsFile)
4753
}
4854
}
55+
}
4956

50-
for (GeneratedTasty(classNode, binaryGen) <- tasty){
57+
private def postProcessTastyAndSendToDisk(tasty: List[GeneratedTasty]): Unit = {
58+
for (GeneratedTasty(classNode, binaryGen) <- tasty) {
5159
classfileWriter.writeTasty(classNode.name.nn, binaryGen())
5260
}
5361
}

compiler/src/dotty/tools/dotc/CompilationUnit.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import core._
55
import Contexts._
66
import SymDenotations.ClassDenotation
77
import Symbols._
8+
import Comments.Comment
89
import util.{FreshNameCreator, SourceFile, NoSource}
910
import util.Spans.Span
1011
import ast.{tpd, untpd}
@@ -69,11 +70,23 @@ class CompilationUnit protected (val source: SourceFile) {
6970
/** Can this compilation unit be suspended */
7071
def isSuspendable: Boolean = true
7172

73+
/** List of all comments present in this compilation unit */
74+
var comments: List[Comment] = Nil
75+
76+
/** This is used to record dependencies to invalidate during incremental
77+
* compilation, but only if `ctx.runZincPhases` is true.
78+
*/
79+
val depRecorder: sbt.DependencyRecorder = sbt.DependencyRecorder()
80+
7281
/** Suspends the compilation unit by thowing a SuspendException
7382
* and recording the suspended compilation unit
7483
*/
7584
def suspend()(using Context): Nothing =
7685
assert(isSuspendable)
86+
// Clear references to symbols that may become stale. No need to call
87+
// `depRecorder.sendToZinc()` since all compilation phases will be rerun
88+
// when this unit is unsuspended.
89+
depRecorder.clear()
7790
if !suspended then
7891
if (ctx.settings.XprintSuspension.value)
7992
report.echo(i"suspended: $this")

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,16 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
240240

241241
for (phase <- ctx.base.allPhases)
242242
if (phase.isRunnable)
243-
Stats.trackTime(s"$phase ms ") {
243+
Stats.trackTime(s"phase time ms/$phase") {
244244
val start = System.currentTimeMillis
245245
val profileBefore = profiler.beforePhase(phase)
246246
units = phase.runOn(units)
247247
profiler.afterPhase(phase, profileBefore)
248248
if (ctx.settings.Xprint.value.containsPhase(phase))
249249
for (unit <- units)
250-
lastPrintedTree =
251-
printTree(lastPrintedTree)(using ctx.fresh.setPhase(phase.next).setCompilationUnit(unit))
250+
def printCtx(unit: CompilationUnit) = phase.printingContext(
251+
ctx.fresh.setPhase(phase.next).setCompilationUnit(unit))
252+
lastPrintedTree = printTree(lastPrintedTree)(using printCtx(unit))
252253
report.informTime(s"$phase ", start)
253254
Stats.record(s"total trees at end of $phase", ast.Trees.ntrees)
254255
for (unit <- units)
@@ -308,7 +309,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
308309

309310
private def printTree(last: PrintedTree)(using Context): PrintedTree = {
310311
val unit = ctx.compilationUnit
311-
val fusedPhase = ctx.phase.prevMega
312+
val fusedPhase = ctx.phase.prev.megaPhase
312313
val echoHeader = f"[[syntax trees at end of $fusedPhase%25s]] // ${unit.source}"
313314
val tree = if ctx.isAfterTyper then unit.tpdTree else unit.untpdTree
314315
val treeString = fusedPhase.show(tree)

0 commit comments

Comments
 (0)