From a244f4e141ab31c4f3384ee73f80f353e959ba3a Mon Sep 17 00:00:00 2001 From: Martin Duhem Date: Wed, 11 Nov 2015 14:49:50 +0100 Subject: [PATCH] Fix Codacy failure by specifying return type --- compile/interface/src/main/scala/xsbt/Compat.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile/interface/src/main/scala/xsbt/Compat.scala b/compile/interface/src/main/scala/xsbt/Compat.scala index 8a5ca6a3d..5b8c3983b 100644 --- a/compile/interface/src/main/scala/xsbt/Compat.scala +++ b/compile/interface/src/main/scala/xsbt/Compat.scala @@ -46,12 +46,12 @@ abstract class Compat { val ScalaObjectClass = definitions.ScalaObjectClass // `afterPostErasure` doesn't exist in Scala < 2.10 - implicit def withAfterPostErasure(global: Global) = new WithAfterPostErasure(global) + implicit def withAfterPostErasure(global: Global): WithAfterPostErasure = new WithAfterPostErasure(global) class WithAfterPostErasure(global: Global) { def afterPostErasure[T](op: => T): T = op } // `exitingPostErasure` was called `afterPostErasure` in 2.10 - implicit def withExitingPostErasure(global: Global) = new WithExitingPostErasure(global) + implicit def withExitingPostErasure(global: Global): WithExitingPostErasure = new WithExitingPostErasure(global) class WithExitingPostErasure(global: Global) { def exitingPostErasure[T](op: => T): T = global afterPostErasure op } @@ -108,7 +108,7 @@ abstract class Compat { def getClassIfDefined(x: String): Symbol = NoSymbol } private class WithRootMirror(x: Any) { - def rootMirror = new DummyMirror + def rootMirror: DummyMirror = new DummyMirror } lazy val AnyValClass = global.rootMirror.getClassIfDefined("scala.AnyVal")