Merge pull request #1613 from jedesah/topic/remove-warnings

Remove compiler warnings
This commit is contained in:
Josh Suereth 2014-09-24 09:10:35 -04:00
commit d2a18926b0
3 changed files with 11 additions and 11 deletions

View File

@ -163,8 +163,8 @@ object Act {
}
def resolveTask(task: ParsedAxis[AttributeKey[_]]): Option[AttributeKey[_]] =
task match {
case ParsedGlobal | Omitted => None
case t: ParsedValue[AttributeKey[_]] => Some(t.value)
case ParsedGlobal | Omitted => None
case t: ParsedValue[AttributeKey[_]]@unchecked => Some(t.value)
}
def filterStrings(base: Parser[String], valid: Set[String], label: String): Parser[String] =

View File

@ -76,7 +76,7 @@ private[sbt] object Analyze {
}
private def trapAndLog(log: Logger)(execute: => Unit) {
try { execute }
catch { case e => log.trace(e); log.error(e.toString) }
catch { case e: Throwable => log.trace(e); log.error(e.toString) }
}
private def guessSourceName(name: String) = Some(takeToDollar(trimClassExt(name)))
private def takeToDollar(name: String) =

View File

@ -24,14 +24,14 @@ abstract class EvaluateSettings[Scope] {
private[this] val transform: Initialize ~> INode = new (Initialize ~> INode) {
def apply[T](i: Initialize[T]): INode[T] = i match {
case k: Keyed[s, T] => single(getStatic(k.scopedKey), k.transform)
case a: Apply[k, T] => new MixedNode[k, T](a.alist.transform[Initialize, INode](a.inputs, transform), a.f, a.alist)
case b: Bind[s, T] => new BindNode[s, T](transform(b.in), x => transform(b.f(x)))
case init.StaticScopes => strictConstant(allScopes.asInstanceOf[T]) // can't convince scalac that StaticScopes => T == Set[Scope]
case v: Value[T] => constant(v.value)
case v: ValidationCapture[T] => strictConstant(v.key)
case t: TransformCapture => strictConstant(t.f)
case o: Optional[s, T] => o.a match {
case k: Keyed[s, T] @unchecked => single(getStatic(k.scopedKey), k.transform)
case a: Apply[k, T] @unchecked => new MixedNode[k, T](a.alist.transform[Initialize, INode](a.inputs, transform), a.f, a.alist)
case b: Bind[s, T] @unchecked => new BindNode[s, T](transform(b.in), x => transform(b.f(x)))
case init.StaticScopes => strictConstant(allScopes.asInstanceOf[T]) // can't convince scalac that StaticScopes => T == Set[Scope]
case v: Value[T] @unchecked => constant(v.value)
case v: ValidationCapture[T] @unchecked => strictConstant(v.key)
case t: TransformCapture => strictConstant(t.f)
case o: Optional[s, T] @unchecked => o.a match {
case None => constant(() => o.f(None))
case Some(i) => single[s, T](transform(i), x => o.f(Some(x)))
}