diff options
author | Martin Odersky <odersky@gmail.com> | 2008-02-26 10:53:33 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-02-26 10:53:33 +0000 |
commit | 54df3c451cb58d77a6dfe5e4114b51b8eedc5c57 (patch) | |
tree | 0e50c3e98394a2f966140619d4e11be846e18e8f /src/compiler | |
parent | f41ab7c062b47087f9cb0ba4eea71ea043f8c2e5 (diff) | |
download | scala-54df3c451cb58d77a6dfe5e4114b51b8eedc5c57.tar.gz scala-54df3c451cb58d77a6dfe5e4114b51b8eedc5c57.tar.bz2 scala-54df3c451cb58d77a6dfe5e4114b51b8eedc5c57.zip |
fixed #519
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 3fc3e30585..bbae1daf7a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -232,7 +232,12 @@ trait Infer { // todo: use also for other error messages private def existentialContext(tp: Type) = tp.existentialSkolems match { case List() => "" - case skolems => " where "+(skolems map (_.existentialToString) mkString ", ") + case skolems => + def disambiguate(ss: List[String]) = ss match { + case List() => ss + case s :: ss1 => s :: (ss1 map (s1 => if (s1 == s) "(some other)"+s1 else s1)) + } + " where "+(disambiguate(skolems map (_.existentialToString)) mkString ", ") } def foundReqMsg(found: Type, req: Type): String = |