diff options
author | Paul Phillips <paulp@improving.org> | 2011-05-31 05:08:53 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-05-31 05:08:53 +0000 |
commit | ad328ff2c016787b99300e397549d15dc2965ed3 (patch) | |
tree | b4e20bf571e17159d25cc4485ecc106980fb3e5a /src | |
parent | edad717cc1934d80dc0b6a9af528eed8ef4b30b6 (diff) | |
download | scala-ad328ff2c016787b99300e397549d15dc2965ed3.tar.gz scala-ad328ff2c016787b99300e397549d15dc2965ed3.tar.bz2 scala-ad328ff2c016787b99300e397549d15dc2965ed3.zip |
Cleaning up power mode import issues (and the a...
Cleaning up power mode import issues (and the amazing first power mode
test) no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/Power.scala | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/Power.scala b/src/compiler/scala/tools/nsc/interpreter/Power.scala index 8fbbbe7683..34b324f0ca 100644 --- a/src/compiler/scala/tools/nsc/interpreter/Power.scala +++ b/src/compiler/scala/tools/nsc/interpreter/Power.scala @@ -56,7 +56,12 @@ abstract class Power[G <: Global]( val intp: IMain ) extends SharesGlobal[G] { import intp.{ beQuietDuring, interpret, parse } - import global.{ opt, definitions, stringToTermName, NoSymbol, NoType, analyzer, CompilationUnit } + import global.{ + opt, definitions, analyzer, + stringToTermName, typeRef, + CompilationUnit, + NoSymbol, NoPrefix, NoType + } abstract class SymSlurper { def isKeep(sym: Symbol): Boolean @@ -296,9 +301,7 @@ abstract class Power[G <: Global]( // fallback implicit def replPrinting[T](x: T)(implicit pretty: Prettifier[T] = Prettifier.default[T]) = new PrintingConvenience[T](x) } - trait Implicits2 extends Implicits1 with SharesGlobal[G] { - import global._ - + trait Implicits2 extends Implicits1 { class RichSymbol(sym: Symbol) { // convenient type application def apply(targs: Type*): Type = typeRef(NoPrefix, sym, targs.toList) @@ -320,9 +323,7 @@ abstract class Power[G <: Global]( implicit def replInputStream(in: InputStream)(implicit codec: Codec): RichInputStream = new RichInputStream(in) implicit def replInputStreamURL(url: URL)(implicit codec: Codec) = replInputStream(url.openStream()) } - object Implicits extends Implicits2 { - val global: G = Power.this.global - } + object Implicits extends Implicits2 { } trait ReplUtilities { def ?[T: Manifest] = InternalInfo[T] |