summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-08-15 10:54:16 -0700
committerJames Iry <jamesiry@gmail.com>2013-08-15 10:54:16 -0700
commit8053c197941608b06089de4a618615d46552aa0b (patch)
treeb19cfa3f58ad248c5e516cd2aa3fd7123ba62e00 /src/compiler
parentf1886cdc9d921d5878105c59b0b22a812b3e4458 (diff)
parent3222add79cb873ee42a1459edcea1c9cb61d8ec9 (diff)
downloadscala-8053c197941608b06089de4a618615d46552aa0b.tar.gz
scala-8053c197941608b06089de4a618615d46552aa0b.tar.bz2
scala-8053c197941608b06089de4a618615d46552aa0b.zip
Merge pull request #2834 from retronym/ticket/7752
SI-7752 Don't disambiguate type parameters of overloaded alts
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
index 4950a7efef..2270e812eb 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -366,11 +366,14 @@ trait TypeDiagnostics {
val strings = mutable.Map[String, Set[TypeDiag]]() withDefaultValue Set()
val names = mutable.Map[Name, Set[TypeDiag]]() withDefaultValue Set()
- def record(t: Type, sym: Symbol) = {
- val diag = TypeDiag(t, sym)
+ val localsSet = locals.toSet
- strings("" + t) += diag
- names(sym.name) += diag
+ def record(t: Type, sym: Symbol) = {
+ if (!localsSet(sym)) {
+ val diag = TypeDiag(t, sym)
+ strings("" + t) += diag
+ names(sym.name) += diag
+ }
}
for (tpe <- types ; t <- tpe) {
t match {