Skip to content

Commit

Permalink
Extraneous semis
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Jul 25, 2018
1 parent 6550c06 commit 72804b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/compiler-bridge/src/main/scala/xsbt/ExtractAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import xsbti.api._

import scala.annotation.tailrec
import scala.tools.nsc.Global
import scala.PartialFunction.cond

/**
* Extracts full (including private members) API representation out of Symbols and Types.
Expand Down Expand Up @@ -263,7 +264,7 @@ class ExtractAPI[GlobalType <: Global](
typeParams: Array[xsbti.api.TypeParameter],
valueParameters: List[xsbti.api.ParameterList]): xsbti.api.Def = {
def parameterList(syms: List[Symbol]): xsbti.api.ParameterList = {
val isImplicitList = syms match { case head :: _ => isImplicit(head); case _ => false }
val isImplicitList = cond(syms) { case head :: _ => isImplicit(head) }
xsbti.api.ParameterList.of(syms.map(parameterS).toArray, isImplicitList)
}
t match {
Expand Down Expand Up @@ -551,7 +552,7 @@ class ExtractAPI[GlobalType <: Global](
case SuperType(thistpe: Type, supertpe: Type) =>
reporter.warning(
NoPosition,
"sbt-api: Super type (not implemented): this=" + thistpe + ", super=" + supertpe);
"sbt-api: Super type (not implemented): this=" + thistpe + ", super=" + supertpe)
Constants.emptyType
case at: AnnotatedType =>
at.annotations match {
Expand All @@ -567,10 +568,10 @@ class ExtractAPI[GlobalType <: Global](
xsbti.api.Polymorphic.of(processType(in, resultType), typeParameters(in, typeParams))
case NullaryMethodType(_) =>
reporter.warning(NoPosition,
"sbt-api: Unexpected nullary method type " + in + " in " + in.owner);
"sbt-api: Unexpected nullary method type " + in + " in " + in.owner)
Constants.emptyType
case _ =>
reporter.warning(NoPosition, "sbt-api: Unhandled type " + t.getClass + " : " + t);
reporter.warning(NoPosition, "sbt-api: Unhandled type " + t.getClass + " : " + t)
Constants.emptyType
}
}
Expand Down

0 comments on commit 72804b4

Please sign in to comment.