Skip to content

Commit ebc097d

Browse files
committed
Adapt the codebase to stricter pattern binding rules
In order to bootstrap the compiler with the rules now enforced by default by the previous commit.
1 parent e357422 commit ebc097d

File tree

73 files changed

+149
-148
lines changed

Some content is hidden

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

73 files changed

+149
-148
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
349349
// but I was able to derrive it by reading
350350
// AbstractValidatingLambdaMetafactory.validateMetafactoryArgs
351351

352-
val DesugaredSelect(prefix, _) = fun
352+
val DesugaredSelect(prefix, _) = fun: @unchecked
353353
genLoad(prefix)
354354
}
355355

@@ -693,7 +693,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
693693
lineNumber(app)
694694
app match {
695695
case Apply(_, args) if app.symbol eq defn.newArrayMethod =>
696-
val List(elemClaz, Literal(c: Constant), ArrayValue(_, dims)) = args
696+
val List(elemClaz, Literal(c: Constant), ArrayValue(_, dims)) = args: @unchecked
697697

698698
generatedType = toTypeKind(c.typeValue)
699699
mkArrayConstructorCall(generatedType.asArrayBType, app, dims)
@@ -770,7 +770,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
770770
if (invokeStyle.hasInstance) genLoadQualifier(fun)
771771
genLoadArguments(args, paramTKs(app))
772772

773-
val DesugaredSelect(qual, name) = fun // fun is a Select, also checked in genLoadQualifier
773+
val DesugaredSelect(qual, name) = fun: @unchecked // fun is a Select, also checked in genLoadQualifier
774774
val isArrayClone = name == nme.clone_ && qual.tpe.widen.isInstanceOf[JavaArrayType]
775775
if (isArrayClone) {
776776
// Special-case Array.clone, introduced in 36ef60e. The goal is to generate this call
@@ -813,7 +813,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
813813
} // end of genApply()
814814

815815
private def genArrayValue(av: tpd.JavaSeqLiteral): BType = {
816-
val ArrayValue(tpt, elems) = av
816+
val ArrayValue(tpt, elems) = av: @unchecked
817817

818818
lineNumber(av)
819819
genArray(elems, tpt)
@@ -1488,7 +1488,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
14881488
import ScalaPrimitivesOps.{ ZNOT, ZAND, ZOR, EQ }
14891489

14901490
// lhs and rhs of test
1491-
lazy val DesugaredSelect(lhs, _) = fun
1491+
lazy val DesugaredSelect(lhs, _) = fun: @unchecked
14921492
val rhs = if (args.isEmpty) tpd.EmptyTree else args.head // args.isEmpty only for ZNOT
14931493

14941494
def genZandOrZor(and: Boolean): Unit = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
149149
// sorting ensures nested classes are listed after their enclosing class thus satisfying the Eclipse Java compiler
150150
for (nestedClass <- allNestedClasses.sortBy(_.internalName.toString)) {
151151
// Extract the innerClassEntry - we know it exists, enclosingNestedClassesChain only returns nested classes.
152-
val Some(e) = nestedClass.innerClassAttributeEntry
152+
val Some(e) = nestedClass.innerClassAttributeEntry: @unchecked
153153
jclass.visitInnerClass(e.name, e.outerName, e.innerName, e.flags)
154154
}
155155
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
666666
val origSym = dd.symbol.asTerm
667667
val newSym = makeStatifiedDefSymbol(origSym, origSym.name)
668668
tpd.DefDef(newSym, { paramRefss =>
669-
val selfParamRef :: regularParamRefs = paramRefss.head
669+
val selfParamRef :: regularParamRefs = paramRefss.head: @unchecked
670670
val enclosingClass = origSym.owner.asClass
671671
new TreeTypeMap(
672672
typeMap = _.substThis(enclosingClass, selfParamRef.symbol.termRef)

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ class JSCodeGen()(using genCtx: Context) {
10261026
*/
10271027

10281028
val (primaryTree :: Nil, secondaryTrees) =
1029-
constructorTrees.partition(_.symbol.isPrimaryConstructor)
1029+
constructorTrees.partition(_.symbol.isPrimaryConstructor): @unchecked
10301030

10311031
val primaryCtor = genPrimaryJSClassCtor(primaryTree)
10321032
val secondaryCtors = secondaryTrees.map(genSecondaryJSClassCtor(_))
@@ -1107,7 +1107,7 @@ class JSCodeGen()(using genCtx: Context) {
11071107

11081108
private def genPrimaryJSClassCtor(dd: DefDef): PrimaryJSCtor = {
11091109
val sym = dd.symbol
1110-
val Block(stats, _) = dd.rhs
1110+
val Block(stats, _) = dd.rhs: @unchecked
11111111
assert(sym.isPrimaryConstructor, s"called with non-primary ctor: $sym")
11121112

11131113
var jsSuperCall: Option[js.JSSuperConstructorCall] = None
@@ -1180,7 +1180,7 @@ class JSCodeGen()(using genCtx: Context) {
11801180

11811181
assert(thisCall.isDefined,
11821182
i"could not find the this() call in secondary JS constructor at ${dd.sourcePos}:\n${stats.map(_.show).mkString("\n")}")
1183-
val Some((targetCtor, ctorArgs)) = thisCall
1183+
val Some((targetCtor, ctorArgs)) = thisCall: @unchecked
11841184

11851185
new SplitSecondaryJSCtor(sym, genParamsAndInfo(sym, dd.paramss),
11861186
beforeThisCall.result(), targetCtor, ctorArgs, afterThisCall.result())
@@ -2145,7 +2145,7 @@ class JSCodeGen()(using genCtx: Context) {
21452145
*/
21462146
private def genSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
21472147
implicit val pos = tree.span
2148-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
2148+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
21492149
val sym = fun.symbol
21502150

21512151
if (sym == defn.Any_getClass) {
@@ -2186,7 +2186,7 @@ class JSCodeGen()(using genCtx: Context) {
21862186
private def genApplyNew(tree: Apply): js.Tree = {
21872187
implicit val pos: SourcePosition = tree.sourcePos
21882188

2189-
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree
2189+
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree: @unchecked
21902190
val ctor = fun.symbol
21912191
val tpe = tpt.tpe
21922192

@@ -2235,7 +2235,7 @@ class JSCodeGen()(using genCtx: Context) {
22352235
acquireContextualJSClassValue { jsClassValue =>
22362236
implicit val pos: Position = tree.span
22372237

2238-
val Apply(fun @ Select(New(tpt), _), args) = tree
2238+
val Apply(fun @ Select(New(tpt), _), args) = tree: @unchecked
22392239
val cls = tpt.tpe.typeSymbol
22402240
val ctor = fun.symbol
22412241

@@ -2904,7 +2904,7 @@ class JSCodeGen()(using genCtx: Context) {
29042904

29052905
implicit val pos = tree.span
29062906

2907-
val Apply(fun, args) = tree
2907+
val Apply(fun, args) = tree: @unchecked
29082908
val arrayObj = qualifierOf(fun)
29092909

29102910
val genArray = genExpr(arrayObj)
@@ -3173,7 +3173,7 @@ class JSCodeGen()(using genCtx: Context) {
31733173
private def genJSSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
31743174
acquireContextualJSClassValue { explicitJSSuperClassValue =>
31753175
implicit val pos = tree.span
3176-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
3176+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
31773177
val sym = fun.symbol
31783178

31793179
val genReceiver = genExpr(qual)
@@ -3248,7 +3248,7 @@ class JSCodeGen()(using genCtx: Context) {
32483248
/** Gen JS code for a switch-`Match`, which is translated into an IR `js.Match`. */
32493249
def genMatch(tree: Tree, isStat: Boolean): js.Tree = {
32503250
implicit val pos = tree.span
3251-
val Match(selector, cases) = tree
3251+
val Match(selector, cases) = tree: @unchecked
32523252

32533253
def abortMatch(msg: String): Nothing =
32543254
throw new FatalError(s"$msg in switch-like pattern match at ${tree.span}: $tree")
@@ -3447,7 +3447,7 @@ class JSCodeGen()(using genCtx: Context) {
34473447
val call = if (isStaticCall) {
34483448
genApplyStatic(sym, formalCaptures.map(_.ref) ::: actualParams)
34493449
} else {
3450-
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref)
3450+
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref): @unchecked
34513451
if (!sym.owner.isNonNativeJSClass || sym.isJSExposed)
34523452
genApplyMethodMaybeStatically(thisCaptureRef, sym, argCaptureRefs ::: actualParams)
34533453
else
@@ -3464,7 +3464,7 @@ class JSCodeGen()(using genCtx: Context) {
34643464
}
34653465

34663466
if (isThisFunction) {
3467-
val thisParam :: otherParams = formalParams
3467+
val thisParam :: otherParams = formalParams: @unchecked
34683468
js.Closure(
34693469
arrow = false,
34703470
formalCaptures,
@@ -3976,7 +3976,7 @@ class JSCodeGen()(using genCtx: Context) {
39763976
*/
39773977
private def genReflectiveCall(tree: Apply, isSelectDynamic: Boolean): js.Tree = {
39783978
implicit val pos = tree.span
3979-
val Apply(fun @ Select(receiver, _), args) = tree
3979+
val Apply(fun @ Select(receiver, _), args) = tree: @unchecked
39803980

39813981
val selectedValueTree = js.Apply(js.ApplyFlags.empty, genExpr(receiver),
39823982
js.MethodIdent(selectedValueMethodName), Nil)(jstpe.AnyType)
@@ -4219,7 +4219,7 @@ class JSCodeGen()(using genCtx: Context) {
42194219
private def genCaptureValuesFromFakeNewInstance(tree: Tree): List[js.Tree] = {
42204220
implicit val pos: Position = tree.span
42214221

4222-
val Apply(fun @ Select(New(_), _), args) = tree
4222+
val Apply(fun @ Select(New(_), _), args) = tree: @unchecked
42234223
val sym = fun.symbol
42244224

42254225
/* We use the same strategy as genActualJSArgs to detect which parameters were
@@ -4545,7 +4545,7 @@ class JSCodeGen()(using genCtx: Context) {
45454545
pathName.split('.').toList
45464546

45474547
def parseGlobalPath(pathName: String): Global = {
4548-
val globalRef :: path = parsePath(pathName)
4548+
val globalRef :: path = parsePath(pathName): @unchecked
45494549
Global(globalRef, path)
45504550
}
45514551

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
355355
None
356356
} else {
357357
val formalArgsRegistry = new FormalArgsRegistry(1, false)
358-
val (List(arg), None) = formalArgsRegistry.genFormalArgs()
358+
val (List(arg), None) = formalArgsRegistry.genFormalArgs(): @unchecked
359359
val body = genOverloadDispatchSameArgc(jsName, formalArgsRegistry,
360360
setters.map(new ExportedSymbol(_, static)), jstpe.AnyType, None)
361361
Some((arg, body))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ object desugar {
391391

392392
/** The expansion of a class definition. See inline comments for what is involved */
393393
def classDef(cdef: TypeDef)(using Context): Tree = {
394-
val impl @ Template(constr0, _, self, _) = cdef.rhs
394+
val impl @ Template(constr0, _, self, _) = cdef.rhs: @unchecked
395395
val className = normalizeName(cdef, impl).asTypeName
396396
val parents = impl.parents
397397
val mods = cdef.mods
@@ -678,7 +678,7 @@ object desugar {
678678
.withMods(companionMods | Synthetic))
679679
.withSpan(cdef.span).toList
680680
if (companionDerived.nonEmpty)
681-
for (modClsDef @ TypeDef(_, _) <- mdefs)
681+
for (case modClsDef @ TypeDef(_, _) <- mdefs)
682682
modClsDef.putAttachment(DerivingCompanion, impl.srcPos.startPos)
683683
mdefs
684684
}
@@ -736,7 +736,7 @@ object desugar {
736736

737737
enumCompanionRef match {
738738
case ref: TermRefTree => // have the enum import watch the companion object
739-
val (modVal: ValDef) :: _ = companions
739+
val (modVal: ValDef) :: _ = companions: @unchecked
740740
ref.watching(modVal)
741741
case _ =>
742742
}
@@ -1171,7 +1171,7 @@ object desugar {
11711171

11721172
/** Expand variable identifier x to x @ _ */
11731173
def patternVar(tree: Tree)(using Context): Bind = {
1174-
val Ident(name) = unsplice(tree)
1174+
val Ident(name) = unsplice(tree): @unchecked
11751175
Bind(name, Ident(nme.WILDCARD)).withSpan(tree.span)
11761176
}
11771177

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
952952
Some(tree.args.head)
953953
else if tree.symbol == defn.QuotedTypeModule_of then
954954
// quoted.Type.of[<body>](quotes)
955-
val TypeApply(_, body :: _) = tree.fun
955+
val TypeApply(_, body :: _) = tree.fun: @unchecked
956956
Some(body)
957957
else None
958958
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ class TreeTypeMap(
152152

153153
private def transformAllParamss(paramss: List[ParamClause]): (TreeTypeMap, List[ParamClause]) = paramss match
154154
case params :: paramss1 =>
155-
val (tmap1, params1: ParamClause) = (params: @unchecked) match
155+
val (tmap1, params1: ParamClause) = ((params: @unchecked) match
156156
case ValDefs(vparams) => transformDefs(vparams)
157157
case TypeDefs(tparams) => transformDefs(tparams)
158+
): @unchecked
158159
val (tmap2, paramss2) = tmap1.transformAllParamss(paramss1)
159160
(tmap2, params1 :: paramss2)
160161
case nil =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
289289
ta.assignType(untpd.TypeDef(sym.name, TypeTree(sym.info)), sym)
290290

291291
def ClassDef(cls: ClassSymbol, constr: DefDef, body: List[Tree], superArgs: List[Tree] = Nil)(using Context): TypeDef = {
292-
val firstParent :: otherParents = cls.info.parents
292+
val firstParent :: otherParents = cls.info.parents: @unchecked
293293
val superRef =
294294
if (cls.is(Trait)) TypeTree(firstParent)
295295
else {

compiler/src/dotty/tools/dotc/config/Settings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object Settings:
8282
}
8383

8484
def tryToSet(state: ArgsSummary): ArgsSummary = {
85-
val ArgsSummary(sstate, arg :: args, errors, warnings) = state
85+
val ArgsSummary(sstate, arg :: args, errors, warnings) = state: @unchecked
8686
def update(value: Any, args: List[String]): ArgsSummary =
8787
var dangers = warnings
8888
val value1 =

compiler/src/dotty/tools/dotc/core/Annotations.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ object Annotations {
3434
if (i < args.length) Some(args(i)) else None
3535
}
3636
def argumentConstant(i: Int)(using Context): Option[Constant] =
37-
for (ConstantType(c) <- argument(i) map (_.tpe.widenTermRefExpr.normalized)) yield c
37+
for (case ConstantType(c) <- argument(i) map (_.tpe.widenTermRefExpr.normalized)) yield c
3838

3939
def argumentConstantString(i: Int)(using Context): Option[String] =
40-
for (Constant(s: String) <- argumentConstant(i)) yield s
40+
for (case Constant(s: String) <- argumentConstant(i)) yield s
4141

4242
/** The tree evaluaton is in progress. */
4343
def isEvaluating: Boolean = false
@@ -219,7 +219,7 @@ object Annotations {
219219

220220
def unapply(ann: Annotation)(using Context): Option[Symbol] =
221221
if (ann.symbol == defn.ChildAnnot) {
222-
val AppliedType(_, (arg: NamedType) :: Nil) = ann.tree.tpe
222+
val AppliedType(_, (arg: NamedType) :: Nil) = ann.tree.tpe: @unchecked
223223
Some(arg.symbol)
224224
}
225225
else None

compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ trait ConstraintHandling {
263263
(c1 eq constraint)
264264
|| {
265265
constraint = c1
266-
val TypeBounds(lo, hi) = constraint.entry(param)
266+
val TypeBounds(lo, hi) = constraint.entry(param): @unchecked
267267
isSub(lo, hi)
268268
}
269269
end addOneBound
@@ -359,7 +359,7 @@ trait ConstraintHandling {
359359

360360
if level1 != level2 then
361361
boundRemoved = LevelAvoidMap(-1, math.min(level1, level2))(boundRemoved)
362-
val TypeBounds(lo, hi) = boundRemoved
362+
val TypeBounds(lo, hi) = boundRemoved: @unchecked
363363
// After avoidance, the interval might be empty, e.g. in
364364
// tests/pos/i8900-promote.scala:
365365
// >: x.type <: Singleton
@@ -410,7 +410,7 @@ trait ConstraintHandling {
410410
*/
411411
protected final def isSatisfiable(using Context): Boolean =
412412
constraint.forallParams { param =>
413-
val TypeBounds(lo, hi) = constraint.entry(param)
413+
val TypeBounds(lo, hi) = constraint.entry(param): @unchecked
414414
isSub(lo, hi) || {
415415
report.log(i"sub fail $lo <:< $hi")
416416
false

compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
511511
if (tl.isInstanceOf[HKLambda]) {
512512
// HKLambdas are hash-consed, need to create an artificial difference by adding
513513
// a LazyRef to a bound.
514-
val TypeBounds(lo, hi) :: pinfos1 = tl.paramInfos
514+
val TypeBounds(lo, hi) :: pinfos1 = tl.paramInfos: @unchecked
515515
paramInfos = TypeBounds(lo, LazyRef.of(hi)) :: pinfos1
516516
}
517517
ensureFresh(tl.newLikeThis(tl.paramNames, paramInfos, tl.resultType))

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,8 +2130,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21302130
def lubArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo], canConstrain: Boolean = false): List[Type] =
21312131
tparams match {
21322132
case tparam :: tparamsRest =>
2133-
val arg1 :: args1Rest = args1
2134-
val arg2 :: args2Rest = args2
2133+
val arg1 :: args1Rest = args1: @unchecked
2134+
val arg2 :: args2Rest = args2: @unchecked
21352135
val common = singletonInterval(arg1, arg2)
21362136
val v = tparam.paramVarianceSign
21372137
val lubArg =
@@ -2162,8 +2162,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21622162
def glbArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo]): List[Type] =
21632163
tparams match {
21642164
case tparam :: tparamsRest =>
2165-
val arg1 :: args1Rest = args1
2166-
val arg2 :: args2Rest = args2
2165+
val arg1 :: args1Rest = args1: @unchecked
2166+
val arg2 :: args2Rest = args2: @unchecked
21672167
val common = singletonInterval(arg1, arg2)
21682168
val v = tparam.paramVarianceSign
21692169
val glbArg =
@@ -2897,7 +2897,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
28972897
cas
28982898
}
28992899

2900-
val defn.MatchCase(pat, body) = cas1
2900+
val defn.MatchCase(pat, body) = cas1: @unchecked
29012901

29022902
if (isSubType(scrut, pat))
29032903
// `scrut` is a subtype of `pat`: *It's a Match!*

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
680680
}
681681

682682
private def eraseArray(tp: Type)(using Context) = {
683-
val defn.ArrayOf(elemtp) = tp
683+
val defn.ArrayOf(elemtp) = tp: @unchecked
684684
if (isGenericArrayElement(elemtp, isScala2 = sourceLanguage.isScala2)) defn.ObjectType
685685
else JavaArrayType(erasureFn(sourceLanguage, semiEraseVCs = false, isConstructor, isSymbol, wildcardOK)(elemtp))
686686
}

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class ClassfileParser(
252252
*/
253253
def normalizeConstructorParams() = innerClasses.get(currentClassName.toString) match {
254254
case Some(entry) if !isStatic(entry.jflags) =>
255-
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info
255+
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info: @unchecked
256256
var normalizedParamNames = paramNames.tail
257257
var normalizedParamTypes = paramTypes.tail
258258
if ((jflags & JAVA_ACC_SYNTHETIC) != 0) {

compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TastyPickler(val rootCls: ClassSymbol) {
3939
sections.foreach(_._2.assemble())
4040

4141
val nameBufferHash = TastyHash.pjwHash64(nameBuffer.bytes)
42-
val treeSectionHash +: otherSectionHashes = sections.map(x => TastyHash.pjwHash64(x._2.bytes))
42+
val treeSectionHash +: otherSectionHashes = sections.map(x => TastyHash.pjwHash64(x._2.bytes)): @unchecked
4343

4444
val tastyVersion = ctx.tastyVersion
4545

0 commit comments

Comments
 (0)