Skip to content

Commit c3169a2

Browse files
authored
Merge branch 'scala:main' into fix-22649
2 parents 27b9d9e + e5a9355 commit c3169a2

File tree

492 files changed

+8773
-3805
lines changed

Some content is hidden

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

492 files changed

+8773
-3805
lines changed

.git-blame-ignore-revs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
46a26945a172429740ebdd1fc83517130670080b

.github/workflows/lts-backport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818
- uses: coursier/cache-action@v6
19-
- uses: VirtusLab/scala-cli-setup@v1.7.1
19+
- uses: VirtusLab/scala-cli-setup@v1.8.0
2020
- run: scala-cli ./project/scripts/addToBackportingProject.scala -- ${{ github.sha }}
2121
env:
2222
GRAPHQL_API_TOKEN: ${{ secrets.GRAPHQL_API_TOKEN }}

.github/workflows/publish-sdkman.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- platform: WINDOWS_64
4747
archive : 'scala3-${{ inputs.version }}-x86_64-pc-win32.zip'
4848
steps:
49-
- uses: sdkman/sdkman-release-action@a60691d56279724b4c9ff0399c0ae21d641ab75e
49+
- uses: sdkman/sdkman-release-action@2800d4359ae097a99afea7e0370f0c6e726182a4
5050
with:
5151
CONSUMER-KEY : ${{ secrets.CONSUMER-KEY }}
5252
CONSUMER-TOKEN : ${{ secrets.CONSUMER-TOKEN }}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ object BackendUtils {
186186
21 -> asm.Opcodes.V21,
187187
22 -> asm.Opcodes.V22,
188188
23 -> asm.Opcodes.V23,
189-
24 -> asm.Opcodes.V24
189+
24 -> asm.Opcodes.V24,
190+
25 -> asm.Opcodes.V25
190191
)
191192
}

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

+49-32
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import dotty.tools.dotc.util.SourcePosition
2626
import dotty.tools.dotc.report
2727

2828
import dotty.tools.sjs.ir
29-
import dotty.tools.sjs.ir.{ClassKind, Position, Names => jsNames, Trees => js, Types => jstpe}
29+
import dotty.tools.sjs.ir.{ClassKind, Position, Trees => js, Types => jstpe, WellKnownNames => jswkn}
3030
import dotty.tools.sjs.ir.Names.{ClassName, LocalName, MethodName, SimpleMethodName}
3131
import dotty.tools.sjs.ir.OriginalName
3232
import dotty.tools.sjs.ir.OriginalName.NoOriginalName
@@ -133,7 +133,7 @@ class JSCodeGen()(using genCtx: Context) {
133133
def currentThisType: jstpe.Type = {
134134
currentThisTypeNullable match {
135135
case tpe @ jstpe.ClassType(cls, _) =>
136-
jstpe.BoxedClassToPrimType.getOrElse(cls, tpe.toNonNullable)
136+
jswkn.BoxedClassToPrimType.getOrElse(cls, tpe.toNonNullable)
137137
case tpe @ jstpe.AnyType =>
138138
// We are in a JS class, in which even `this` is nullable
139139
tpe
@@ -424,7 +424,7 @@ class JSCodeGen()(using genCtx: Context) {
424424

425425
val staticInitializerStats = reflectInit ::: staticModuleInit
426426
if (staticInitializerStats.nonEmpty)
427-
List(genStaticConstructorWithStats(ir.Names.StaticInitializerName, js.Block(staticInitializerStats)))
427+
List(genStaticConstructorWithStats(jswkn.StaticInitializerName, js.Block(staticInitializerStats)))
428428
else
429429
Nil
430430
}
@@ -453,7 +453,7 @@ class JSCodeGen()(using genCtx: Context) {
453453
originalName,
454454
ClassKind.Class,
455455
None,
456-
Some(js.ClassIdent(ir.Names.ObjectClass)),
456+
Some(js.ClassIdent(jswkn.ObjectClass)),
457457
Nil,
458458
None,
459459
None,
@@ -574,7 +574,7 @@ class JSCodeGen()(using genCtx: Context) {
574574

575575
if (staticFields.nonEmpty) {
576576
generatedMethods +=
577-
genStaticConstructorWithStats(ir.Names.ClassInitializerName, genLoadModule(companionModuleClass))
577+
genStaticConstructorWithStats(jswkn.ClassInitializerName, genLoadModule(companionModuleClass))
578578
}
579579

580580
(staticFields, staticExports)
@@ -1000,7 +1000,7 @@ class JSCodeGen()(using genCtx: Context) {
10001000
val fqcnArg = js.StringLiteral(sym.fullName.toString)
10011001
val runtimeClassArg = js.ClassOf(toTypeRef(sym.info))
10021002
val loadModuleFunArg =
1003-
js.Closure(arrow = true, Nil, Nil, None, genLoadModule(sym), Nil)
1003+
js.Closure(js.ClosureFlags.arrow, Nil, Nil, None, jstpe.AnyType, genLoadModule(sym), Nil)
10041004

10051005
val stat = genApplyMethod(
10061006
genLoadModule(jsdefn.ReflectModule),
@@ -1035,7 +1035,7 @@ class JSCodeGen()(using genCtx: Context) {
10351035

10361036
val paramTypesArray = js.JSArrayConstr(parameterTypes)
10371037

1038-
val newInstanceFun = js.Closure(arrow = true, Nil, formalParams, None, {
1038+
val newInstanceFun = js.Closure(js.ClosureFlags.arrow, Nil, formalParams, None, jstpe.AnyType, {
10391039
js.New(encodeClassName(sym), encodeMethodSym(ctor), actualParams)
10401040
}, Nil)
10411041

@@ -2389,7 +2389,7 @@ class JSCodeGen()(using genCtx: Context) {
23892389
// Make new class def with static members
23902390
val newClassDef = {
23912391
implicit val pos = originalClassDef.pos
2392-
val parent = js.ClassIdent(jsNames.ObjectClass)
2392+
val parent = js.ClassIdent(jswkn.ObjectClass)
23932393
js.ClassDef(originalClassDef.name, originalClassDef.originalName,
23942394
ClassKind.AbstractJSType, None, Some(parent), interfaces = Nil,
23952395
jsSuperClass = None, jsNativeLoadSpec = None, fields = Nil,
@@ -2427,7 +2427,7 @@ class JSCodeGen()(using genCtx: Context) {
24272427
js.VarRef(selfIdent.name)(jstpe.AnyType)
24282428

24292429
def memberLambda(params: List[js.ParamDef], restParam: Option[js.ParamDef], body: js.Tree)(implicit pos: ir.Position): js.Closure =
2430-
js.Closure(arrow = false, captureParams = Nil, params, restParam, body, captureValues = Nil)
2430+
js.Closure(js.ClosureFlags.function, captureParams = Nil, params, restParam, jstpe.AnyType, body, captureValues = Nil)
24312431

24322432
val fieldDefinitions = jsFieldDefs.toList.map { fdef =>
24332433
implicit val pos = fdef.pos
@@ -2539,7 +2539,8 @@ class JSCodeGen()(using genCtx: Context) {
25392539
beforeSuper ::: superCall ::: afterSuper
25402540
}
25412541

2542-
val closure = js.Closure(arrow = true, jsClassCaptures, Nil, None,
2542+
// Wrap everything in a lambda, for namespacing
2543+
val closure = js.Closure(js.ClosureFlags.arrow, jsClassCaptures, Nil, None, jstpe.AnyType,
25432544
js.Block(inlinedCtorStats, selfRef), jsSuperClassValue :: args)
25442545
js.JSFunctionApply(closure, Nil)
25452546
}
@@ -3350,7 +3351,7 @@ class JSCodeGen()(using genCtx: Context) {
33503351

33513352
// Sanity check: we can handle Ints and Strings (including `null`s), but nothing else
33523353
genSelector.tpe match {
3353-
case jstpe.IntType | jstpe.ClassType(jsNames.BoxedStringClass, _) | jstpe.NullType | jstpe.NothingType =>
3354+
case jstpe.IntType | jstpe.ClassType(jswkn.BoxedStringClass, _) | jstpe.NullType | jstpe.NothingType =>
33543355
// ok
33553356
case _ =>
33563357
abortMatch(s"Invalid selector type ${genSelector.tpe}")
@@ -3514,6 +3515,8 @@ class JSCodeGen()(using genCtx: Context) {
35143515
atPhase(elimRepeatedPhase)(samMethod.info.paramInfoss.flatten.exists(_.isRepeatedParam))
35153516
}
35163517
}
3518+
val isFunctionXXL =
3519+
funInterfaceSym.name == tpnme.FunctionXXL && funInterfaceSym.owner == defn.ScalaRuntimePackageClass
35173520

35183521
val formalParamNames = sym.info.paramNamess.flatten.drop(envSize)
35193522
val formalParamTypes = sym.info.paramInfoss.flatten.drop(envSize)
@@ -3523,8 +3526,11 @@ class JSCodeGen()(using genCtx: Context) {
35233526

35243527
val formalAndActualParams = formalParamNames.lazyZip(formalParamTypes).lazyZip(formalParamRepeateds).map {
35253528
(name, tpe, repeated) =>
3529+
val formalTpe =
3530+
if (isFunctionXXL) jstpe.ArrayType(ObjectArrayTypeRef, nullable = true)
3531+
else jstpe.AnyType
35263532
val formalParam = js.ParamDef(freshLocalIdent(name),
3527-
OriginalName(name.toString), jstpe.AnyType, mutable = false)
3533+
OriginalName(name.toString), formalTpe, mutable = false)
35283534
val actualParam =
35293535
if (repeated) genJSArrayToVarArgs(formalParam.ref)(tree.sourcePos)
35303536
else unbox(formalParam.ref, tpe)
@@ -3559,34 +3565,44 @@ class JSCodeGen()(using genCtx: Context) {
35593565
if (isThisFunction) {
35603566
val thisParam :: otherParams = formalParams: @unchecked
35613567
js.Closure(
3562-
arrow = false,
3568+
js.ClosureFlags.function,
35633569
formalCaptures,
35643570
otherParams,
35653571
restParam,
3572+
jstpe.AnyType,
35663573
js.Block(
35673574
js.VarDef(thisParam.name, thisParam.originalName,
35683575
thisParam.ptpe, mutable = false,
35693576
js.This()(thisParam.ptpe)(thisParam.pos))(thisParam.pos),
35703577
genBody),
35713578
actualCaptures)
35723579
} else {
3573-
val closure = js.Closure(arrow = true, formalCaptures, formalParams, restParam, genBody, actualCaptures)
3580+
val closure = js.Closure(js.ClosureFlags.typed, formalCaptures,
3581+
formalParams, restParam, jstpe.AnyType, genBody, actualCaptures)
35743582

35753583
if (!funInterfaceSym.exists || defn.isFunctionClass(funInterfaceSym)) {
35763584
val formalCount = formalParams.size
3577-
val cls = ClassName("scala.scalajs.runtime.AnonFunction" + formalCount)
3578-
val ctorName = MethodName.constructor(
3579-
jstpe.ClassRef(ClassName("scala.scalajs.js.Function" + formalCount)) :: Nil)
3580-
js.New(cls, js.MethodIdent(ctorName), List(closure))
3581-
} else if (funInterfaceSym.name == tpnme.FunctionXXL && funInterfaceSym.owner == defn.ScalaRuntimePackageClass) {
3582-
val cls = ClassName("scala.scalajs.runtime.AnonFunctionXXL")
3583-
val ctorName = MethodName.constructor(
3584-
jstpe.ClassRef(ClassName("scala.scalajs.js.Function1")) :: Nil)
3585-
js.New(cls, js.MethodIdent(ctorName), List(closure))
3585+
val descriptor = js.NewLambda.Descriptor(
3586+
superClass = encodeClassName(defn.AbstractFunctionClass(formalCount)),
3587+
interfaces = Nil,
3588+
methodName = MethodName(applySimpleMethodName, List.fill(formalCount)(jswkn.ObjectRef), jswkn.ObjectRef),
3589+
paramTypes = List.fill(formalCount)(jstpe.AnyType),
3590+
resultType = jstpe.AnyType
3591+
)
3592+
js.NewLambda(descriptor, closure)(encodeClassType(defn.FunctionSymbol(formalCount)).toNonNullable)
3593+
} else if (isFunctionXXL) {
3594+
val descriptor = js.NewLambda.Descriptor(
3595+
superClass = jswkn.ObjectClass,
3596+
interfaces = List(encodeClassName(defn.FunctionXXLClass)),
3597+
methodName = MethodName(applySimpleMethodName, List(ObjectArrayTypeRef), jswkn.ObjectRef),
3598+
paramTypes = List(jstpe.ArrayType(ObjectArrayTypeRef, nullable = true)),
3599+
resultType = jstpe.AnyType
3600+
)
3601+
js.NewLambda(descriptor, closure)(encodeClassType(funInterfaceSym).toNonNullable)
35863602
} else {
35873603
assert(funInterfaceSym.isJSType,
35883604
s"Invalid functional interface $funInterfaceSym reached the back-end")
3589-
closure
3605+
closure.copy(flags = js.ClosureFlags.arrow)
35903606
}
35913607
}
35923608
}
@@ -3699,8 +3715,8 @@ class JSCodeGen()(using genCtx: Context) {
36993715
}
37003716

37013717
private def genThrowClassCastException()(implicit pos: Position): js.Tree = {
3702-
js.UnaryOp(js.UnaryOp.Throw, js.New(jsNames.ClassCastExceptionClass,
3703-
js.MethodIdent(jsNames.NoArgConstructorName), Nil))
3718+
js.UnaryOp(js.UnaryOp.Throw, js.New(jswkn.ClassCastExceptionClass,
3719+
js.MethodIdent(jswkn.NoArgConstructorName), Nil))
37043720
}
37053721

37063722
/** Gen JS code for an isInstanceOf test (for reference types only) */
@@ -3987,7 +4003,7 @@ class JSCodeGen()(using genCtx: Context) {
39874003
case arg: js.JSGlobalRef => js.JSTypeOfGlobalRef(arg)
39884004
case _ => js.JSUnaryOp(js.JSUnaryOp.typeof, arg)
39894005
}
3990-
js.AsInstanceOf(typeofExpr, jstpe.ClassType(jsNames.BoxedStringClass, nullable = true))
4006+
js.AsInstanceOf(typeofExpr, jstpe.ClassType(jswkn.BoxedStringClass, nullable = true))
39914007

39924008
case STRICT_EQ =>
39934009
// js.special.strictEquals(arg1, arg2)
@@ -4235,7 +4251,7 @@ class JSCodeGen()(using genCtx: Context) {
42354251
"literal classOf[T] expressions (typically compiler-generated). " +
42364252
"Other uses are not supported in Scala.js.",
42374253
otherTree.sourcePos)
4238-
(jstpe.AnyType, jstpe.ClassRef(jsNames.ObjectClass))
4254+
(jstpe.AnyType, jstpe.ClassRef(jswkn.ObjectClass))
42394255
}
42404256

42414257
// Gen the actual args, downcasting them to the formal param types
@@ -4870,16 +4886,17 @@ object JSCodeGen {
48704886
private val JSObjectClassName = ClassName("scala.scalajs.js.Object")
48714887
private val JavaScriptExceptionClassName = ClassName("scala.scalajs.js.JavaScriptException")
48724888

4873-
private val ObjectClassRef = jstpe.ClassRef(ir.Names.ObjectClass)
4889+
private val ObjectArrayTypeRef = jstpe.ArrayTypeRef(jswkn.ObjectRef, 1)
48744890

4891+
private val applySimpleMethodName = SimpleMethodName("apply")
48754892
private val newSimpleMethodName = SimpleMethodName("new")
48764893

4877-
private val selectedValueMethodName = MethodName("selectedValue", Nil, ObjectClassRef)
4894+
private val selectedValueMethodName = MethodName("selectedValue", Nil, jswkn.ObjectRef)
48784895

48794896
private val JLRArrayNewInstanceMethodName =
4880-
MethodName("newInstance", List(jstpe.ClassRef(jsNames.ClassClass), jstpe.ArrayTypeRef(jstpe.IntRef, 1)), ObjectClassRef)
4897+
MethodName("newInstance", List(jstpe.ClassRef(jswkn.ClassClass), jstpe.ArrayTypeRef(jstpe.IntRef, 1)), jswkn.ObjectRef)
48814898

4882-
private val ObjectArgConstructorName = MethodName.constructor(List(ObjectClassRef))
4899+
private val ObjectArgConstructorName = MethodName.constructor(List(jswkn.ObjectRef))
48834900

48844901
private val thisOriginalName = OriginalName("this")
48854902

compiler/src/dotty/tools/backend/sjs/JSEncoding.scala

+7-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import StdNames.*
1616
import dotty.tools.dotc.transform.sjs.JSSymUtils.*
1717

1818
import dotty.tools.sjs.ir
19-
import dotty.tools.sjs.ir.{Trees => js, Types => jstpe}
19+
import dotty.tools.sjs.ir.{Trees => js, Types => jstpe, WellKnownNames => jswkn}
2020
import dotty.tools.sjs.ir.Names.{LocalName, LabelName, SimpleFieldName, FieldName, SimpleMethodName, MethodName, ClassName}
2121
import dotty.tools.sjs.ir.OriginalName
2222
import dotty.tools.sjs.ir.OriginalName.NoOriginalName
@@ -235,7 +235,7 @@ object JSEncoding {
235235

236236
def encodeDynamicImportForwarderIdent(params: List[Symbol])(using Context, ir.Position): js.MethodIdent = {
237237
val paramTypeRefs = params.map(sym => paramOrResultTypeRef(sym.info))
238-
val resultTypeRef = jstpe.ClassRef(ir.Names.ObjectClass)
238+
val resultTypeRef = jstpe.ClassRef(jswkn.ObjectClass)
239239
val methodName = MethodName(dynamicImportForwarderSimpleName, paramTypeRefs, resultTypeRef)
240240
js.MethodIdent(methodName)
241241
}
@@ -282,7 +282,7 @@ object JSEncoding {
282282
* - scala.Null to scala.runtime.Null$.
283283
*/
284284
if (sym1 == defn.BoxedUnitClass)
285-
ir.Names.BoxedUnitClass
285+
jswkn.BoxedUnitClass
286286
else if (sym1 == defn.NothingClass)
287287
ScalaRuntimeNothingClassName
288288
else if (sym1 == defn.NullClass)
@@ -326,6 +326,9 @@ object JSEncoding {
326326

327327
case typeRef: jstpe.ArrayTypeRef =>
328328
jstpe.ArrayType(typeRef, nullable = true)
329+
330+
case typeRef: jstpe.TransientTypeRef =>
331+
throw AssertionError(s"Unexpected transient type ref $typeRef for ${typeRefInternal._2}")
329332
}
330333
}
331334

@@ -359,7 +362,7 @@ object JSEncoding {
359362
*/
360363
def nonClassTypeRefToTypeRef(sym: Symbol): (jstpe.TypeRef, Symbol) = {
361364
//assert(sym.isType && isCompilingArray, sym)
362-
(jstpe.ClassRef(ir.Names.ObjectClass), defn.ObjectClass)
365+
(jstpe.ClassRef(jswkn.ObjectClass), defn.ObjectClass)
363366
}
364367

365368
tp.widenDealias match {

compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala

+4-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ import TypeErasure.ErasedValueType
2222
import dotty.tools.dotc.util.{SourcePosition, SrcPos}
2323
import dotty.tools.dotc.report
2424

25-
import dotty.tools.sjs.ir.{Position, Names => jsNames, Trees => js, Types => jstpe}
26-
import dotty.tools.sjs.ir.Names.DefaultModuleID
25+
import dotty.tools.sjs.ir.{Position, Names => jsNames, Trees => js, Types => jstpe, WellKnownNames => jswkn}
2726
import dotty.tools.sjs.ir.OriginalName.NoOriginalName
2827
import dotty.tools.sjs.ir.Position.NoPosition
2928
import dotty.tools.sjs.ir.Trees.OptimizerHints
@@ -87,7 +86,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
8786
symForAnnot.annotations.collect {
8887
case annot if annot.symbol == jsdefn.JSExportTopLevelAnnot =>
8988
val jsName = annot.argumentConstantString(0).get
90-
val moduleID = annot.argumentConstantString(1).getOrElse(DefaultModuleID)
89+
val moduleID = annot.argumentConstantString(1).getOrElse(jswkn.DefaultModuleID)
9190
TopLevelExportInfo(moduleID, jsName)(annot.tree.sourcePos)
9291
}
9392
}
@@ -947,8 +946,8 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
947946
case jstpe.FloatType => PrimitiveTypeTest(jstpe.FloatType, 7)
948947
case jstpe.DoubleType => PrimitiveTypeTest(jstpe.DoubleType, 8)
949948

950-
case jstpe.ClassType(Names.BoxedUnitClass, _) => PrimitiveTypeTest(jstpe.UndefType, 0)
951-
case jstpe.ClassType(Names.BoxedStringClass, _) => PrimitiveTypeTest(jstpe.StringType, 9)
949+
case jstpe.ClassType(jswkn.BoxedUnitClass, _) => PrimitiveTypeTest(jstpe.UndefType, 0)
950+
case jstpe.ClassType(jswkn.BoxedStringClass, _) => PrimitiveTypeTest(jstpe.StringType, 9)
952951
case jstpe.ClassType(_, _) => InstanceOfTypeTest(tpe)
953952

954953
case jstpe.ArrayType(_, _) => InstanceOfTypeTest(tpe)

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ object CompilationUnit {
158158
unit1
159159
}
160160

161-
/** Create a compilation unit corresponding to an in-memory String.
161+
/** Create a compilation unit corresponding to an in-memory String.
162162
* Used for `compiletime.testing.typeChecks`.
163163
*/
164-
def apply(name: String, source: String)(using Context): CompilationUnit = {
164+
def apply(name: String, source: String): CompilationUnit = {
165165
val src = SourceFile.virtual(name = name, content = source, maybeIncomplete = false)
166166
new CompilationUnit(src, null)
167167
}

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ import dotty.tools.dotc.util.chaining.*
4242
import java.util.{Timer, TimerTask}
4343

4444
/** A compiler run. Exports various methods to compile source files */
45-
class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with ConstraintRunInfo {
45+
class Run(comp: Compiler, ictx: Context)
46+
extends ImplicitRunInfo, ConstraintRunInfo, cc.CaptureRunInfo {
4647

4748
/** Default timeout to stop looking for further implicit suggestions, in ms.
4849
* This is usually for the first import suggestion; subsequent suggestions
@@ -519,6 +520,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
519520
/** Print summary of warnings and errors encountered */
520521
def printSummary(): Unit = {
521522
printMaxConstraint()
523+
printMaxPath()
522524
val r = runContext.reporter
523525
if !r.errorsReported then
524526
profile.printSummary()
@@ -529,6 +531,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
529531
override def reset(): Unit = {
530532
super[ImplicitRunInfo].reset()
531533
super[ConstraintRunInfo].reset()
534+
super[CaptureRunInfo].reset()
532535
myCtx = null
533536
myUnits = Nil
534537
myUnitsCached = Nil

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ object desugar {
642642
.withMods(mods & (GivenOrImplicit | Erased | hasDefault | Tracked) | Param)
643643
}
644644

645-
/** Desugar type def (not param): Under x.moduliity this can expand
645+
/** Desugar type def (not param): Under x.modularity this can expand
646646
* context bounds, which are expanded to evidence ValDefs. These will
647647
* ultimately map to deferred givens.
648648
*/

0 commit comments

Comments
 (0)