fix compiler interface compatibility with 2.11

This commit is contained in:
Mark Harrah 2013-04-27 16:25:03 -04:00
parent 0e1f211fe5
commit 0b876cc57d
1 changed files with 3 additions and 1 deletions

View File

@ -136,6 +136,8 @@ abstract class Compat
// in 2.10, sym.moduleSuffix exists, but genJVM.moduleSuffix(Symbol) does not
def moduleSuffix(sym: Symbol): String = sourceCompatibilityOnly
// in 2.11 genJVM does not exist
def genJVM = this
}
// in 2.9, NullaryMethodType was added to Type
object NullaryMethodTpe {
@ -145,7 +147,7 @@ abstract class Compat
// before 2.10, sym.moduleSuffix doesn't exist, but genJVM.moduleSuffix does
private[this] implicit def symbolCompat(sym: Symbol): SymbolCompat = new SymbolCompat(sym)
private[this] final class SymbolCompat(sym: Symbol) {
def moduleSuffix = genJVM.moduleSuffix(sym)
def moduleSuffix = global.genJVM.moduleSuffix(sym)
}