Skip to content

Commit b0a7dbb

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.
1 parent bd377fb commit b0a7dbb

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
@@ -348,7 +348,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
348348
// but I was able to derrive it by reading
349349
// AbstractValidatingLambdaMetafactory.validateMetafactoryArgs
350350

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

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

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

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

814814
private def genArrayValue(av: tpd.JavaSeqLiteral): BType = {
815-
val ArrayValue(tpt, elems) = av
815+
val ArrayValue(tpt, elems) = av: @unchecked
816816

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

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

14931493
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
@@ -677,7 +677,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
677677
val origSym = dd.symbol.asTerm
678678
val newSym = makeStatifiedDefSymbol(origSym, origSym.name)
679679
tpd.DefDef(newSym, { paramRefss =>
680-
val selfParamRef :: regularParamRefs = paramRefss.head
680+
val selfParamRef :: regularParamRefs = paramRefss.head: @unchecked
681681
val enclosingClass = origSym.owner.asClass
682682
new TreeTypeMap(
683683
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())
@@ -2139,7 +2139,7 @@ class JSCodeGen()(using genCtx: Context) {
21392139
*/
21402140
private def genSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
21412141
implicit val pos = tree.span
2142-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
2142+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
21432143
val sym = fun.symbol
21442144

21452145
if (sym == defn.Any_getClass) {
@@ -2180,7 +2180,7 @@ class JSCodeGen()(using genCtx: Context) {
21802180
private def genApplyNew(tree: Apply): js.Tree = {
21812181
implicit val pos: SourcePosition = tree.sourcePos
21822182

2183-
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree
2183+
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree: @unchecked
21842184
val ctor = fun.symbol
21852185
val tpe = tpt.tpe
21862186

@@ -2229,7 +2229,7 @@ class JSCodeGen()(using genCtx: Context) {
22292229
acquireContextualJSClassValue { jsClassValue =>
22302230
implicit val pos: Position = tree.span
22312231

2232-
val Apply(fun @ Select(New(tpt), _), args) = tree
2232+
val Apply(fun @ Select(New(tpt), _), args) = tree: @unchecked
22332233
val cls = tpt.tpe.typeSymbol
22342234
val ctor = fun.symbol
22352235

@@ -2898,7 +2898,7 @@ class JSCodeGen()(using genCtx: Context) {
28982898

28992899
implicit val pos = tree.span
29002900

2901-
val Apply(fun, args) = tree
2901+
val Apply(fun, args) = tree: @unchecked
29022902
val arrayObj = qualifierOf(fun)
29032903

29042904
val genArray = genExpr(arrayObj)
@@ -3167,7 +3167,7 @@ class JSCodeGen()(using genCtx: Context) {
31673167
private def genJSSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
31683168
acquireContextualJSClassValue { explicitJSSuperClassValue =>
31693169
implicit val pos = tree.span
3170-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
3170+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
31713171
val sym = fun.symbol
31723172

31733173
val genReceiver = genExpr(qual)
@@ -3242,7 +3242,7 @@ class JSCodeGen()(using genCtx: Context) {
32423242
/** Gen JS code for a switch-`Match`, which is translated into an IR `js.Match`. */
32433243
def genMatch(tree: Tree, isStat: Boolean): js.Tree = {
32443244
implicit val pos = tree.span
3245-
val Match(selector, cases) = tree
3245+
val Match(selector, cases) = tree: @unchecked
32463246

32473247
def abortMatch(msg: String): Nothing =
32483248
throw new FatalError(s"$msg in switch-like pattern match at ${tree.span}: $tree")
@@ -3441,7 +3441,7 @@ class JSCodeGen()(using genCtx: Context) {
34413441
val call = if (isStaticCall) {
34423442
genApplyStatic(sym, formalCaptures.map(_.ref) ::: actualParams)
34433443
} else {
3444-
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref)
3444+
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref): @unchecked
34453445
if (!sym.owner.isNonNativeJSClass || sym.isJSExposed)
34463446
genApplyMethodMaybeStatically(thisCaptureRef, sym, argCaptureRefs ::: actualParams)
34473447
else
@@ -3458,7 +3458,7 @@ class JSCodeGen()(using genCtx: Context) {
34583458
}
34593459

34603460
if (isThisFunction) {
3461-
val thisParam :: otherParams = formalParams
3461+
val thisParam :: otherParams = formalParams: @unchecked
34623462
js.Closure(
34633463
arrow = false,
34643464
formalCaptures,
@@ -3970,7 +3970,7 @@ class JSCodeGen()(using genCtx: Context) {
39703970
*/
39713971
private def genReflectiveCall(tree: Apply, isSelectDynamic: Boolean): js.Tree = {
39723972
implicit val pos = tree.span
3973-
val Apply(fun @ Select(receiver, _), args) = tree
3973+
val Apply(fun @ Select(receiver, _), args) = tree: @unchecked
39743974

39753975
val selectedValueTree = js.Apply(js.ApplyFlags.empty, genExpr(receiver),
39763976
js.MethodIdent(selectedValueMethodName), Nil)(jstpe.AnyType)
@@ -4213,7 +4213,7 @@ class JSCodeGen()(using genCtx: Context) {
42134213
private def genCaptureValuesFromFakeNewInstance(tree: Tree): List[js.Tree] = {
42144214
implicit val pos: Position = tree.span
42154215

4216-
val Apply(fun @ Select(New(_), _), args) = tree
4216+
val Apply(fun @ Select(New(_), _), args) = tree: @unchecked
42174217
val sym = fun.symbol
42184218

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

45414541
def parseGlobalPath(pathName: String): Global = {
4542-
val globalRef :: path = parsePath(pathName)
4542+
val globalRef :: path = parsePath(pathName): @unchecked
45434543
Global(globalRef, path)
45444544
}
45454545

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
@@ -2138,8 +2138,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21382138
def lubArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo], canConstrain: Boolean = false): List[Type] =
21392139
tparams match {
21402140
case tparam :: tparamsRest =>
2141-
val arg1 :: args1Rest = args1
2142-
val arg2 :: args2Rest = args2
2141+
val arg1 :: args1Rest = args1: @unchecked
2142+
val arg2 :: args2Rest = args2: @unchecked
21432143
val common = singletonInterval(arg1, arg2)
21442144
val v = tparam.paramVarianceSign
21452145
val lubArg =
@@ -2170,8 +2170,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21702170
def glbArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo]): List[Type] =
21712171
tparams match {
21722172
case tparam :: tparamsRest =>
2173-
val arg1 :: args1Rest = args1
2174-
val arg2 :: args2Rest = args2
2173+
val arg1 :: args1Rest = args1: @unchecked
2174+
val arg2 :: args2Rest = args2: @unchecked
21752175
val common = singletonInterval(arg1, arg2)
21762176
val v = tparam.paramVarianceSign
21772177
val glbArg =
@@ -2908,7 +2908,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
29082908
cas
29092909
}
29102910

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

29132913
if (isSubType(scrut, pat))
29142914
// `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)