diff options
author | Allan Renucci <allan.renucci@gmail.com> | 2017-04-03 21:20:24 +0200 |
---|---|---|
committer | Allan Renucci <allan.renucci@gmail.com> | 2017-04-03 21:20:24 +0200 |
commit | 8377c0da86f7e9959e40e4b863a4831df9947e67 (patch) | |
tree | 5e09e2d8d6d2bdd32fef28bb4f56623e9c0e508f /compiler/src | |
parent | 5021c768ccd123e148291bdda28920dea5e85630 (diff) | |
download | dotty-8377c0da86f7e9959e40e4b863a4831df9947e67.tar.gz dotty-8377c0da86f7e9959e40e4b863a4831df9947e67.tar.bz2 dotty-8377c0da86f7e9959e40e4b863a4831df9947e67.zip |
Fixes @unchecked warnings
Diffstat (limited to 'compiler/src')
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 } |