summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-02 11:24:24 -0700
committerPaul Phillips <paulp@improving.org>2012-10-04 16:01:47 -0700
commit1f99df2c66cb1933dd4db74aa872497a4e26975b (patch)
treebef4cf226f23f83cc314c950d1c2ecaeb8f11450
parent120e14fadf30b4c39f953832108d19b736dc6f2d (diff)
downloadscala-1f99df2c66cb1933dd4db74aa872497a4e26975b.tar.gz
scala-1f99df2c66cb1933dd4db74aa872497a4e26975b.tar.bz2
scala-1f99df2c66cb1933dd4db74aa872497a4e26975b.zip
Eliminated pattern matcher warning.
Implicit extractor must be available to pattern match on abstract type. Requires prior commit not to crash under -Yrangepos.
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala b/src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala
index fe1c4c0ca8..0bf4999fd6 100644
--- a/src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala
@@ -212,6 +212,7 @@ trait TypeStrings {
}
private def tparamString[T: ru.TypeTag] : String = {
+ import ru._
def typeArguments: List[ru.Type] = ru.typeOf[T] match { case ru.TypeRef(_, _, args) => args; case _ => Nil }
// [Eugene to Paul] need to use not the `rootMirror`, but a mirror with the REPL's classloader
// how do I get to it? acquiring context classloader seems unreliable because of multithreading
@@ -256,4 +257,4 @@ trait TypeStrings {
)
}
-object TypeStrings extends TypeStrings { } \ No newline at end of file
+object TypeStrings extends TypeStrings { }