summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-12-03 11:53:17 -0800
committerPaul Phillips <paulp@improving.org>2012-12-17 17:47:59 -0800
commit5f1e18b1cd8f76f40bb01d257ae3b81cb70e3e07 (patch)
treeb2e850946257461fe20941b078da6be3f42273be /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parente14917528e1c080a7f10785e21de36f3a7769718 (diff)
downloadscala-5f1e18b1cd8f76f40bb01d257ae3b81cb70e3e07.tar.gz
scala-5f1e18b1cd8f76f40bb01d257ae3b81cb70e3e07.tar.bz2
scala-5f1e18b1cd8f76f40bb01d257ae3b81cb70e3e07.zip
Optimization in SpecializeTypes.
Avoid time traveling to find type parameters which will never be there.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index a1c1b53cce..703c12038f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2716,13 +2716,8 @@ trait Typers extends Modes with Adaptations with Tags {
val att = templ.attachments.get[CompoundTypeTreeOriginalAttachment].getOrElse(CompoundTypeTreeOriginalAttachment(Nil, Nil))
templ.removeAttachment[CompoundTypeTreeOriginalAttachment]
templ updateAttachment att.copy(stats = stats1)
- for (stat <- stats1 if stat.isDef) {
- val member = stat.symbol
- if (!(context.owner.ancestors forall
- (bc => member.matchingSymbol(bc, context.owner.thisType) == NoSymbol))) {
- member setFlag OVERRIDE
- }
- }
+ for (stat <- stats1 if stat.isDef && stat.symbol.isOverridingSymbol)
+ stat.symbol setFlag OVERRIDE
}
}