Skip to content

Commit

Permalink
Use reporter instead of forwarder in global
Browse files Browse the repository at this point in the history
`reporter.warning` is already used elsewhere, so
use it uniformly.
  • Loading branch information
som-snytt committed Jul 25, 2018
1 parent 4d3ed1d commit 6550c06
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/compiler-bridge/src/main/scala/xsbt/ExtractAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ class ExtractAPI[GlobalType <: Global](
else
xsbti.api.Parameterized.of(base, types(in, args))
case SuperType(thistpe: Type, supertpe: Type) =>
warning("sbt-api: Super type (not implemented): this=" + thistpe + ", super=" + supertpe);
reporter.warning(
NoPosition,
"sbt-api: Super type (not implemented): this=" + thistpe + ", super=" + supertpe);
Constants.emptyType
case at: AnnotatedType =>
at.annotations match {
Expand All @@ -564,9 +566,12 @@ class ExtractAPI[GlobalType <: Global](
case PolyType(typeParams, resultType) =>
xsbti.api.Polymorphic.of(processType(in, resultType), typeParameters(in, typeParams))
case NullaryMethodType(_) =>
warning("sbt-api: Unexpected nullary method type " + in + " in " + in.owner);
reporter.warning(NoPosition,
"sbt-api: Unexpected nullary method type " + in + " in " + in.owner);
Constants.emptyType
case _ =>
reporter.warning(NoPosition, "sbt-api: Unhandled type " + t.getClass + " : " + t);
Constants.emptyType
case _ => warning("sbt-api: Unhandled type " + t.getClass + " : " + t); Constants.emptyType
}
}
private def makeExistentialType(in: Symbol, t: ExistentialType): xsbti.api.Existential = {
Expand Down

0 comments on commit 6550c06

Please sign in to comment.