diff options
author | Martin Odersky <odersky@gmail.com> | 2012-04-12 18:56:20 -0700 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-04-12 18:56:20 -0700 |
commit | a7a1e3a1959f26c9b44b40b328ef217b4ebdbaba (patch) | |
tree | 62e2b8b9149e9b62621591c1bfc1b6ffb0170c53 /src/compiler/scala/tools/nsc/interpreter/IMain.scala | |
parent | 6061a22fcd3480e18e60254ad06c8a46b2f1ce53 (diff) | |
download | scala-a7a1e3a1959f26c9b44b40b328ef217b4ebdbaba.tar.gz scala-a7a1e3a1959f26c9b44b40b328ef217b4ebdbaba.tar.bz2 scala-a7a1e3a1959f26c9b44b40b328ef217b4ebdbaba.zip |
Various improvements to SIP 18 diagnostics. Made scala library and compiler feature clean.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/IMain.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/IMain.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/IMain.scala b/src/compiler/scala/tools/nsc/interpreter/IMain.scala index c0f7d8412a..43e01bebfd 100644 --- a/src/compiler/scala/tools/nsc/interpreter/IMain.scala +++ b/src/compiler/scala/tools/nsc/interpreter/IMain.scala @@ -24,6 +24,7 @@ import scala.collection.{ mutable, immutable } import scala.util.control.Exception.{ ultimately } import IMain._ import java.util.concurrent.Future +import language.implicitConversions /** directory to save .class files to */ private class ReplVirtualDirectory(out: JPrintWriter) extends VirtualDirectory("(memory)", None) { @@ -203,8 +204,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends }).toList } - implicit def installReplTypeOps(tp: Type): ReplTypeOps = new ReplTypeOps(tp) - class ReplTypeOps(tp: Type) { + implicit class ReplTypeOps(tp: Type) { def orElse(other: => Type): Type = if (tp ne NoType) tp else other def andAlso(fn: Type => Type): Type = if (tp eq NoType) tp else fn(tp) } @@ -825,7 +825,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends } def lastWarnings: List[(Position, String)] = ( if (lastRun == null) Nil - else removeDupWarnings(lastRun.deprecationWarnings.reverse) ++ lastRun.uncheckedWarnings.reverse + else removeDupWarnings(lastRun.allConditionalWarnings flatMap (_.warnings)) ) private var lastRun: Run = _ private def evalMethod(name: String) = evalClass.getMethods filter (_.getName == name) match { |