diff --git a/compile/interface/src/main/scala/xsbt/Compat.scala b/compile/interface/src/main/scala/xsbt/Compat.scala index 2c7331100..1d38f6dec 100644 --- a/compile/interface/src/main/scala/xsbt/Compat.scala +++ b/compile/interface/src/main/scala/xsbt/Compat.scala @@ -45,11 +45,12 @@ abstract class Compat { val Nullary = global.NullaryMethodType val ScalaObjectClass = definitions.ScalaObjectClass - // In 2.11, afterPostErasure has been renamed to exitingPostErasure + // `afterPostErasure` doesn't exist in Scala < 2.10 implicit def withAfterPostErasure(global: Global) = new WithAfterPostErasure(global) class WithAfterPostErasure(global: Global) { - def afterPostErasure[T](op: => T): T = sourceCompatibilityOnly + def afterPostErasure[T](op: => T): T = op } + // `exitingPostErasure` was called `afterPostErasure` in 2.10 implicit def withExitingPostErasure(global: Global) = new WithExitingPostErasure(global) class WithExitingPostErasure(global: Global) { def exitingPostErasure[T](op: => T): T = global afterPostErasure op