Skip to content

Commit d999ecc

Browse files
committed
bugfix: Fix issues after backporting
1 parent 8bd2916 commit d999ecc

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ object desugar {
16571657
case pat @ Bind(nme.WILDCARD, body) =>
16581658
val name =
16591659
body match
1660-
case Typed(Ident(nme.WILDCARD), tpt) if pat.mods.is(Given) => inventGivenName(tpt)
1660+
case Typed(Ident(nme.WILDCARD), tpt) if pat.mods.is(Given) => inventGivenOrExtensionName(tpt)
16611661
case _ => UniqueName.fresh()
16621662
(cpy.Bind(pat)(name, body).withMods(pat.mods), Ident(name))
16631663
case Bind(name, _) => (pat, Ident(name))

compiler/src/dotty/tools/dotc/transform/init/Checker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Checker extends Phase:
4646
cancellable {
4747
val classes = traverser.getClasses()
4848

49-
if ctx.settings.Whas.safeInit then
49+
if ctx.settings.Whas.checkInit then
5050
Semantic.checkClasses(classes)(using checkCtx)
5151
}
5252

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import config.Config
5353
import transform.CheckUnused.OriginalName
5454

5555
import scala.annotation.constructorOnly
56+
import scala.util.chaining.scalaUtilChainingOps
5657
import dotty.tools.dotc.rewrites.Rewrites
5758

5859
object Typer {

compiler/test/dotty/tools/dotc/reporting/CodeActionTest.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotty.tools.DottyTest
44
import dotty.tools.dotc.rewrites.Rewrites
55
import dotty.tools.dotc.rewrites.Rewrites.ActionPatch
66
import dotty.tools.dotc.util.SourceFile
7+
import dotty.tools.dotc.core.Contexts._
78

89
import scala.annotation.tailrec
910
import scala.jdk.CollectionConverters.*
@@ -295,8 +296,8 @@ class CodeActionTest extends DottyTest:
295296
val rep = new StoreReporter(null) with UniqueMessagePositions with HideNonSensicalMessages
296297
initialCtx.setReporter(rep).withoutColors
297298

298-
private def checkCodeAction(code: String, title: String, expected: String, afterPhase: String = "typer") =
299-
ctx = newContext
299+
private def checkCodeAction(code: String, title: String, expected: String, afterPhase: String = "typer", ctxx: Context = newContext) =
300+
ctx = ctxx
300301
val source = SourceFile.virtual("test", code).content
301302
val runCtx = checkCompile(afterPhase, code) { (_, _) => () }
302303
val diagnostics = runCtx.reporter.removeBufferedMessages

0 commit comments

Comments
 (0)