Skip to content

Commit 3b7bb6c

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 fb0bfa4 commit 3b7bb6c

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

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

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

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

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

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
670670
val origSym = dd.symbol.asTerm
671671
val newSym = makeStatifiedDefSymbol(origSym, origSym.name)
672672
tpd.DefDef(newSym, { paramRefss =>
673-
val selfParamRef :: regularParamRefs = paramRefss.head
673+
val selfParamRef :: regularParamRefs = paramRefss.head: @unchecked
674674
val enclosingClass = origSym.owner.asClass
675675
new TreeTypeMap(
676676
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
@@ -1032,7 +1032,7 @@ class JSCodeGen()(using genCtx: Context) {
10321032
*/
10331033

10341034
val (primaryTree :: Nil, secondaryTrees) =
1035-
constructorTrees.partition(_.symbol.isPrimaryConstructor)
1035+
constructorTrees.partition(_.symbol.isPrimaryConstructor): @unchecked
10361036

10371037
val primaryCtor = genPrimaryJSClassCtor(primaryTree)
10381038
val secondaryCtors = secondaryTrees.map(genSecondaryJSClassCtor(_))
@@ -1113,7 +1113,7 @@ class JSCodeGen()(using genCtx: Context) {
11131113

11141114
private def genPrimaryJSClassCtor(dd: DefDef): PrimaryJSCtor = {
11151115
val sym = dd.symbol
1116-
val Block(stats, _) = dd.rhs
1116+
val Block(stats, _) = dd.rhs: @unchecked
11171117
assert(sym.isPrimaryConstructor, s"called with non-primary ctor: $sym")
11181118

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

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

11911191
new SplitSecondaryJSCtor(sym, genParamsAndInfo(sym, dd.paramss),
11921192
beforeThisCall.result(), targetCtor, ctorArgs, afterThisCall.result())
@@ -2151,7 +2151,7 @@ class JSCodeGen()(using genCtx: Context) {
21512151
*/
21522152
private def genSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
21532153
implicit val pos = tree.span
2154-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
2154+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
21552155
val sym = fun.symbol
21562156

21572157
if (sym == defn.Any_getClass) {
@@ -2192,7 +2192,7 @@ class JSCodeGen()(using genCtx: Context) {
21922192
private def genApplyNew(tree: Apply): js.Tree = {
21932193
implicit val pos: SourcePosition = tree.sourcePos
21942194

2195-
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree
2195+
val Apply(fun @ Select(New(tpt), nme.CONSTRUCTOR), args) = tree: @unchecked
21962196
val ctor = fun.symbol
21972197
val tpe = tpt.tpe
21982198

@@ -2241,7 +2241,7 @@ class JSCodeGen()(using genCtx: Context) {
22412241
acquireContextualJSClassValue { jsClassValue =>
22422242
implicit val pos: Position = tree.span
22432243

2244-
val Apply(fun @ Select(New(tpt), _), args) = tree
2244+
val Apply(fun @ Select(New(tpt), _), args) = tree: @unchecked
22452245
val cls = tpt.tpe.typeSymbol
22462246
val ctor = fun.symbol
22472247

@@ -2911,7 +2911,7 @@ class JSCodeGen()(using genCtx: Context) {
29112911

29122912
implicit val pos = tree.span
29132913

2914-
val Apply(fun, args) = tree
2914+
val Apply(fun, args) = tree: @unchecked
29152915
val arrayObj = qualifierOf(fun)
29162916

29172917
val genArray = genExpr(arrayObj)
@@ -3180,7 +3180,7 @@ class JSCodeGen()(using genCtx: Context) {
31803180
private def genJSSuperCall(tree: Apply, isStat: Boolean): js.Tree = {
31813181
acquireContextualJSClassValue { explicitJSSuperClassValue =>
31823182
implicit val pos = tree.span
3183-
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree
3183+
val Apply(fun @ Select(sup @ Super(qual, _), _), args) = tree: @unchecked
31843184
val sym = fun.symbol
31853185

31863186
val genReceiver = genExpr(qual)
@@ -3255,7 +3255,7 @@ class JSCodeGen()(using genCtx: Context) {
32553255
/** Gen JS code for a switch-`Match`, which is translated into an IR `js.Match`. */
32563256
def genMatch(tree: Tree, isStat: Boolean): js.Tree = {
32573257
implicit val pos = tree.span
3258-
val Match(selector, cases) = tree
3258+
val Match(selector, cases) = tree: @unchecked
32593259

32603260
def abortMatch(msg: String): Nothing =
32613261
throw new FatalError(s"$msg in switch-like pattern match at ${tree.span}: $tree")
@@ -3454,7 +3454,7 @@ class JSCodeGen()(using genCtx: Context) {
34543454
val call = if (isStaticCall) {
34553455
genApplyStatic(sym, formalCaptures.map(_.ref) ::: actualParams)
34563456
} else {
3457-
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref)
3457+
val thisCaptureRef :: argCaptureRefs = formalCaptures.map(_.ref): @unchecked
34583458
if (!sym.owner.isNonNativeJSClass || sym.isJSExposed)
34593459
genApplyMethodMaybeStatically(thisCaptureRef, sym, argCaptureRefs ::: actualParams)
34603460
else
@@ -3471,7 +3471,7 @@ class JSCodeGen()(using genCtx: Context) {
34713471
}
34723472

34733473
if (isThisFunction) {
3474-
val thisParam :: otherParams = formalParams
3474+
val thisParam :: otherParams = formalParams: @unchecked
34753475
js.Closure(
34763476
arrow = false,
34773477
formalCaptures,
@@ -3983,7 +3983,7 @@ class JSCodeGen()(using genCtx: Context) {
39833983
*/
39843984
private def genReflectiveCall(tree: Apply, isSelectDynamic: Boolean): js.Tree = {
39853985
implicit val pos = tree.span
3986-
val Apply(fun @ Select(receiver, _), args) = tree
3986+
val Apply(fun @ Select(receiver, _), args) = tree: @unchecked
39873987

39883988
val selectedValueTree = js.Apply(js.ApplyFlags.empty, genExpr(receiver),
39893989
js.MethodIdent(selectedValueMethodName), Nil)(jstpe.AnyType)
@@ -4226,7 +4226,7 @@ class JSCodeGen()(using genCtx: Context) {
42264226
private def genCaptureValuesFromFakeNewInstance(tree: Tree): List[js.Tree] = {
42274227
implicit val pos: Position = tree.span
42284228

4229-
val Apply(fun @ Select(New(_), _), args) = tree
4229+
val Apply(fun @ Select(New(_), _), args) = tree: @unchecked
42304230
val sym = fun.symbol
42314231

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

45544554
def parseGlobalPath(pathName: String): Global = {
4555-
val globalRef :: path = parsePath(pathName)
4555+
val globalRef :: path = parsePath(pathName): @unchecked
45564556
Global(globalRef, path)
45574557
}
45584558

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ final class JSExportsGen(jsCodeGen: JSCodeGen)(using Context) {
363363
None
364364
} else {
365365
val formalArgsRegistry = new FormalArgsRegistry(1, false)
366-
val (List(arg), None) = formalArgsRegistry.genFormalArgs()
366+
val (List(arg), None) = formalArgsRegistry.genFormalArgs(): @unchecked
367367
val body = genOverloadDispatchSameArgc(jsName, formalArgsRegistry,
368368
setters.map(new ExportedSymbol(_, static)), jstpe.AnyType, None)
369369
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
@@ -674,7 +674,7 @@ object desugar {
674674
.withMods(companionMods | Synthetic))
675675
.withSpan(cdef.span).toList
676676
if (companionDerived.nonEmpty)
677-
for (modClsDef @ TypeDef(_, _) <- mdefs)
677+
for (case modClsDef @ TypeDef(_, _) <- mdefs)
678678
modClsDef.putAttachment(DerivingCompanion, impl.srcPos.startPos)
679679
mdefs
680680
}
@@ -744,7 +744,7 @@ object desugar {
744744

745745
enumCompanionRef match {
746746
case ref: TermRefTree => // have the enum import watch the companion object
747-
val (modVal: ValDef) :: _ = companions
747+
val (modVal: ValDef) :: _ = companions: @unchecked
748748
ref.watching(modVal)
749749
case _ =>
750750
}
@@ -1170,7 +1170,7 @@ object desugar {
11701170

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

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
@@ -290,7 +290,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
290290
ta.assignType(untpd.TypeDef(sym.name, TypeTree(sym.info)), sym)
291291

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

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

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

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

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

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

4242
def argumentConstantString(i: Int)(using Context): Option[String] =
43-
for (Constant(s: String) <- argumentConstant(i)) yield s
43+
for (case Constant(s: String) <- argumentConstant(i)) yield s
4444

4545
/** The tree evaluaton is in progress. */
4646
def isEvaluating: Boolean = false
@@ -222,7 +222,7 @@ object Annotations {
222222

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ trait ConstraintHandling {
265265
(c1 eq constraint)
266266
|| {
267267
constraint = c1
268-
val TypeBounds(lo, hi) = constraint.entry(param)
268+
val TypeBounds(lo, hi) = constraint.entry(param): @unchecked
269269
isSub(lo, hi)
270270
}
271271
end addOneBound
@@ -361,7 +361,7 @@ trait ConstraintHandling {
361361

362362
if level1 != level2 then
363363
boundRemoved = LevelAvoidMap(-1, math.min(level1, level2))(boundRemoved)
364-
val TypeBounds(lo, hi) = boundRemoved
364+
val TypeBounds(lo, hi) = boundRemoved: @unchecked
365365
// After avoidance, the interval might be empty, e.g. in
366366
// tests/pos/i8900-promote.scala:
367367
// >: x.type <: Singleton
@@ -412,7 +412,7 @@ trait ConstraintHandling {
412412
*/
413413
protected final def isSatisfiable(using Context): Boolean =
414414
constraint.forallParams { param =>
415-
val TypeBounds(lo, hi) = constraint.entry(param)
415+
val TypeBounds(lo, hi) = constraint.entry(param): @unchecked
416416
isSub(lo, hi) || {
417417
report.log(i"sub fail $lo <:< $hi")
418418
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
@@ -2121,8 +2121,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21212121
def lubArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo], canConstrain: Boolean = false): List[Type] =
21222122
tparams match {
21232123
case tparam :: tparamsRest =>
2124-
val arg1 :: args1Rest = args1
2125-
val arg2 :: args2Rest = args2
2124+
val arg1 :: args1Rest = args1: @unchecked
2125+
val arg2 :: args2Rest = args2: @unchecked
21262126
val common = singletonInterval(arg1, arg2)
21272127
val v = tparam.paramVarianceSign
21282128
val lubArg =
@@ -2153,8 +2153,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
21532153
def glbArgs(args1: List[Type], args2: List[Type], tparams: List[TypeParamInfo]): List[Type] =
21542154
tparams match {
21552155
case tparam :: tparamsRest =>
2156-
val arg1 :: args1Rest = args1
2157-
val arg2 :: args2Rest = args2
2156+
val arg1 :: args1Rest = args1: @unchecked
2157+
val arg2 :: args2Rest = args2: @unchecked
21582158
val common = singletonInterval(arg1, arg2)
21592159
val v = tparam.paramVarianceSign
21602160
val glbArg =
@@ -2888,7 +2888,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
28882888
cas
28892889
}
28902890

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

28932893
if (isSubType(scrut, pat))
28942894
// `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
@@ -254,7 +254,7 @@ class ClassfileParser(
254254
*/
255255
def normalizeConstructorParams() = innerClasses.get(currentClassName.toString) match {
256256
case Some(entry) if !isStatic(entry.jflags) =>
257-
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info
257+
val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info: @unchecked
258258
var normalizedParamNames = paramNames.tail
259259
var normalizedParamTypes = paramTypes.tail
260260
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
@@ -40,7 +40,7 @@ class TastyPickler(val rootCls: ClassSymbol) {
4040
sections.foreach(_._2.assemble())
4141

4242
val nameBufferHash = TastyHash.pjwHash64(nameBuffer.bytes)
43-
val treeSectionHash +: otherSectionHashes = sections.map(x => TastyHash.pjwHash64(x._2.bytes))
43+
val treeSectionHash +: otherSectionHashes = sections.map(x => TastyHash.pjwHash64(x._2.bytes)): @unchecked
4444

4545
val tastyVersion = ctx.tastyVersion
4646

0 commit comments

Comments
 (0)