From fdd6a4ac1aa23371341b1f7f110cb87ecae7d973 Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Mon, 24 Jun 2024 11:59:45 +0200 Subject: [PATCH] quickfix for failing bootstrapped compilation --- .../src/main/dotty/tools/pc/WithCompilationUnit.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala b/presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala index b4f36c8d27ab..8110db269b3b 100644 --- a/presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala +++ b/presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala @@ -31,7 +31,8 @@ class WithCompilationUnit( driver.run(uri, source) given ctx: Context = driver.currentCtx - val unit = driver.currentCtx.run.units.head + private val run = driver.currentCtx.run + val unit = run.units.head val compilatonUnitContext = ctx.fresh.setCompilationUnit(unit) val offset = params match case op: OffsetParams => op.offset()