From 111511dc6d556040c95e8c75e303b2c52eb56ec3 Mon Sep 17 00:00:00 2001 From: Martin Duhem Date: Wed, 4 Nov 2015 15:04:59 +0100 Subject: [PATCH] `afterPostErasure` didn't exist in 2.9 --- compile/interface/src/main/scala/xsbt/Compat.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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