mirror of https://github.com/sbt/sbt.git
Restore source compatibility with Scala 2.11
This commit is contained in:
parent
46058029b5
commit
efff171618
|
|
@ -45,9 +45,14 @@ abstract class Compat {
|
||||||
val Nullary = global.NullaryMethodType
|
val Nullary = global.NullaryMethodType
|
||||||
val ScalaObjectClass = definitions.ScalaObjectClass
|
val ScalaObjectClass = definitions.ScalaObjectClass
|
||||||
|
|
||||||
|
// In 2.11, afterPostErasure has been renamed to exitingPostErasure
|
||||||
|
implicit def withAfterPostErasure(global: Global) = new WithAfterPostErasure(global)
|
||||||
|
class WithAfterPostErasure(global: Global) {
|
||||||
|
def afterPostErasure[T](op: => T): T = sourceCompatibilityOnly
|
||||||
|
}
|
||||||
implicit def withExitingPostErasure(global: Global) = new WithExitingPostErasure(global)
|
implicit def withExitingPostErasure(global: Global) = new WithExitingPostErasure(global)
|
||||||
class WithExitingPostErasure(global: Global) {
|
class WithExitingPostErasure(global: Global) {
|
||||||
def exitingPostErasure[T](op: => T) = global afterPostErasure op
|
def exitingPostErasure[T](op: => T): T = global afterPostErasure op
|
||||||
}
|
}
|
||||||
|
|
||||||
private[this] final class MiscCompat {
|
private[this] final class MiscCompat {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue