aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/transform/PostTyper.scala6
-rw-r--r--compiler/src/dotty/tools/dotc/transform/TreeChecker.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala2
4 files changed, 6 insertions, 6 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala
index 6c7982d78..e9449a312 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala
@@ -159,7 +159,7 @@ class TreeBuffer extends TastyBuffer(50000) {
val tree = it.next
treeAddrs.get(tree) match {
case addr: Addr => treeAddrs.put(tree, adjusted(addr))
- case addrs: List[Addr] => treeAddrs.put(tree, addrs.map(adjusted))
+ case addrs: List[Addr @unchecked] => treeAddrs.put(tree, addrs.map(adjusted))
}
}
}
diff --git a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
index 8dff58dea..1a6ebb65d 100644
--- a/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
+++ b/compiler/src/dotty/tools/dotc/transform/PostTyper.scala
@@ -264,9 +264,9 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisTran
ctx.error(s"${ident.name} is not a member of ${expr.show}", ident.pos)
}
selectors.foreach {
- case ident: Ident => checkIdent(ident)
- case Thicket((ident: Ident) :: _) => checkIdent(ident)
- case _ =>
+ case ident @ Ident(_) => checkIdent(ident)
+ case Thicket((ident @ Ident(_)) :: _) => checkIdent(ident)
+ case _ =>
}
super.transform(tree)
case tree =>
diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
index 51e2469b2..e478d6127 100644
--- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
+++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala
@@ -145,7 +145,7 @@ class TreeChecker extends Phase with SymTransformer {
override def checkDerivedValueClass(clazz: Symbol, stats: List[Tree])(implicit ctx: Context) = ()
def withDefinedSym[T](tree: untpd.Tree)(op: => T)(implicit ctx: Context): T = tree match {
- case tree: DefTree =>
+ case tree: DefTree @unchecked =>
val sym = tree.symbol
assert(isValidJVMName(sym.name), s"${sym.fullName} name is invalid on jvm")
everDefinedSyms.get(sym) match {
diff --git a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
index f7dd725c8..ed274a3dc 100644
--- a/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
+++ b/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -539,7 +539,7 @@ object ProtoTypes {
/** Dummy tree to be used as an argument of a FunProto or ViewProto type */
object dummyTreeOfType {
def apply(tp: Type): Tree = untpd.Literal(Constant(null)) withTypeUnchecked tp
- def unapply(tree: Tree): Option[Type] = tree match {
+ def unapply(tree: Tree @unchecked): Option[Type] = tree match {
case Literal(Constant(null)) => Some(tree.typeOpt)
case _ => None
}