Skip to content

Commit 7329e9b

Browse files
committed
Adapt the codebase to strict pattern binding warnings
In order to bootstrap the compiler with the rules now enforced by default by the previous commit. adapt more codebase
1 parent 40b917b commit 7329e9b

File tree

74 files changed

+150
-149
lines changed

Some content is hidden

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

74 files changed

+150
-149
lines changed

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

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

354-
val DesugaredSelect(prefix, _) = fun
354+
val DesugaredSelect(prefix, _) = fun: @unchecked
355355
genLoad(prefix)
356356
}
357357

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

700700
generatedType = toTypeKind(c.typeValue)
701701
mkArrayConstructorCall(generatedType.asArrayBType, app, dims)
@@ -772,7 +772,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
772772
if (invokeStyle.hasInstance) genLoadQualifier(fun)
773773
genLoadArguments(args, paramTKs(app))
774774

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

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

820820
lineNumber(av)
821821
genArray(elems, tpt)
@@ -1490,7 +1490,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
14901490
import ScalaPrimitivesOps.{ ZNOT, ZAND, ZOR, EQ }
14911491

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

14961496
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
@@ -151,7 +151,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
151151
// sorting ensures nested classes are listed after their enclosing class thus satisfying the Eclipse Java compiler
152152
for (nestedClass <- allNestedClasses.sortBy(_.internalName.toString)) {
153153
// Extract the innerClassEntry - we know it exists, enclosingNestedClassesChain only returns nested classes.
154-
val Some(e) = nestedClass.innerClassAttributeEntry
154+
val Some(e) = nestedClass.innerClassAttributeEntry: @unchecked
155155
jclass.visitInnerClass(e.name, e.outerName, e.innerName, e.flags)
156156
}
157157
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
667667
val origSym = dd.symbol.asTerm
668668
val newSym = makeStatifiedDefSymbol(origSym, origSym.name)
669669
tpd.DefDef(newSym, { paramRefss =>
670-
val selfParamRef :: regularParamRefs = paramRefss.head
670+
val selfParamRef :: regularParamRefs = paramRefss.head: @unchecked
671671
val enclosingClass = origSym.owner.asClass
672672
new TreeTypeMap(
673673
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
@@ -1025,7 +1025,7 @@ class JSCodeGen()(using genCtx: Context) {
10251025
*/
10261026

10271027
val (primaryTree :: Nil, secondaryTrees) =
1028-
constructorTrees.partition(_.symbol.isPrimaryConstructor)
1028+
constructorTrees.partition(_.symbol.isPrimaryConstructor): @unchecked
10291029

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

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

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

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

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

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

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

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

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

@@ -2903,7 +2903,7 @@ class JSCodeGen()(using genCtx: Context) {
29032903

29042904
implicit val pos = tree.span
29052905

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

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

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

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

34653465
if (isThisFunction) {
3466-
val thisParam :: otherParams = formalParams
3466+
val thisParam :: otherParams = formalParams: @unchecked
34673467
js.Closure(
34683468
arrow = false,
34693469
formalCaptures,
@@ -3975,7 +3975,7 @@ class JSCodeGen()(using genCtx: Context) {
39753975
*/
39763976
private def genReflectiveCall(tree: Apply, isSelectDynamic: Boolean): js.Tree = {
39773977
implicit val pos = tree.span
3978-
val Apply(fun @ Select(receiver, _), args) = tree
3978+
val Apply(fun @ Select(receiver, _), args) = tree: @unchecked
39793979

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

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

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

45464546
def parseGlobalPath(pathName: String): Global = {
4547-
val globalRef :: path = parsePath(pathName)
4547+
val globalRef :: path = parsePath(pathName): @unchecked
45484548
Global(globalRef, path)
45494549
}
45504550

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
356356
None
357357
} else {
358358
val formalArgsRegistry = new FormalArgsRegistry(1, false)
359-
val (List(arg), None) = formalArgsRegistry.genFormalArgs()
359+
val (List(arg), None) = formalArgsRegistry.genFormalArgs(): @unchecked
360360
val body = genOverloadDispatchSameArgc(jsName, formalArgsRegistry,
361361
setters.map(new ExportedSymbol(_, static)), jstpe.AnyType, None)
362362
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
}
@@ -1192,7 +1192,7 @@ object desugar {
11921192

11931193
/** Expand variable identifier x to x @ _ */
11941194
def patternVar(tree: Tree)(using Context): Bind = {
1195-
val Ident(name) = unsplice(tree)
1195+
val Ident(name) = unsplice(tree): @unchecked
11961196
Bind(name, Ident(nme.WILDCARD)).withSpan(tree.span)
11971197
}
11981198

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
@@ -153,9 +153,10 @@ class TreeTypeMap(
153153

154154
private def transformAllParamss(paramss: List[ParamClause]): (TreeTypeMap, List[ParamClause]) = paramss match
155155
case params :: paramss1 =>
156-
val (tmap1, params1: ParamClause) = (params: @unchecked) match
156+
val (tmap1, params1: ParamClause) = ((params: @unchecked) match
157157
case ValDefs(vparams) => transformDefs(vparams)
158158
case TypeDefs(tparams) => transformDefs(tparams)
159+
): @unchecked
159160
val (tmap2, paramss2) = tmap1.transformAllParamss(paramss1)
160161
(tmap2, params1 :: paramss2)
161162
case nil =>

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

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ object Settings:
8484
}
8585

8686
def tryToSet(state: ArgsSummary): ArgsSummary = {
87-
val ArgsSummary(sstate, arg :: args, errors, warnings) = state
87+
val ArgsSummary(sstate, arg :: args, errors, warnings) = state: @unchecked
8888
def update(value: Any, args: List[String]): ArgsSummary =
8989
var dangers = warnings
9090
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
@@ -362,7 +362,7 @@ trait ConstraintHandling {
362362

363363
if level1 != level2 then
364364
boundRemoved = LevelAvoidMap(-1, math.min(level1, level2))(boundRemoved)
365-
val TypeBounds(lo, hi) = boundRemoved
365+
val TypeBounds(lo, hi) = boundRemoved: @unchecked
366366
// After avoidance, the interval might be empty, e.g. in
367367
// tests/pos/i8900-promote.scala:
368368
// >: 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
@@ -512,7 +512,7 @@ class OrderingConstraint(private val boundsMap: ParamBounds,
512512
if (tl.isInstanceOf[HKLambda]) {
513513
// HKLambdas are hash-consed, need to create an artificial difference by adding
514514
// a LazyRef to a bound.
515-
val TypeBounds(lo, hi) :: pinfos1 = tl.paramInfos
515+
val TypeBounds(lo, hi) :: pinfos1 = tl.paramInfos: @unchecked
516516
paramInfos = TypeBounds(lo, LazyRef.of(hi)) :: pinfos1
517517
}
518518
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
@@ -2133,8 +2133,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21332133
def lubArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo], canConstrain: Boolean = false): List[Type] =
21342134
tparams match {
21352135
case tparam :: tparamsRest =>
2136-
val arg1 :: args1Rest = args1
2137-
val arg2 :: args2Rest = args2
2136+
val arg1 :: args1Rest = args1: @unchecked
2137+
val arg2 :: args2Rest = args2: @unchecked
21382138
val common = singletonInterval(arg1, arg2)
21392139
val v = tparam.paramVarianceSign
21402140
val lubArg =
@@ -2165,8 +2165,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21652165
def glbArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo]): List[Type] =
21662166
tparams match {
21672167
case tparam :: tparamsRest =>
2168-
val arg1 :: args1Rest = args1
2169-
val arg2 :: args2Rest = args2
2168+
val arg1 :: args1Rest = args1: @unchecked
2169+
val arg2 :: args2Rest = args2: @unchecked
21702170
val common = singletonInterval(arg1, arg2)
21712171
val v = tparam.paramVarianceSign
21722172
val glbArg =
@@ -2903,7 +2903,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
29032903
cas
29042904
}
29052905

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

29082908
if (isSubType(scrut, pat))
29092909
// `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
@@ -283,7 +283,7 @@ class ClassfileParser(
283283
*/
284284
def normalizeConstructorParams() = innerClasses.get(currentClassName.toString) match {
285285
case Some(entry) if !isStatic(entry.jflags) =>
286-
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info
286+
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info: @unchecked
287287
var normalizedParamNames = paramNames.tail
288288
var normalizedParamTypes = paramTypes.tail
289289
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
@@ -41,7 +41,7 @@ class TastyPickler(val rootCls: ClassSymbol) {
4141
sections.foreach(_._2.assemble())
4242

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

4646
val tastyVersion = ctx.tastyVersion
4747

0 commit comments

Comments
 (0)