summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-20 21:56:14 -0700
committerPaul Phillips <paulp@improving.org>2013-05-21 01:18:20 -0700
commita2ad291acd159ed299eb30305e42a0bace95f02a (patch)
tree63dc189dea7b1096232da0a4e0d0edfdf676578f /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent085b4d9bdb7ba9f9fe00c63e998e93278a34b161 (diff)
downloadscala-a2ad291acd159ed299eb30305e42a0bace95f02a.tar.gz
scala-a2ad291acd159ed299eb30305e42a0bace95f02a.tar.bz2
scala-a2ad291acd159ed299eb30305e42a0bace95f02a.zip
SI-3425 erasure crash with refinement members.
Checking that a refinement class symbol does not override any symbols does mean it will have to be invoke reflectively; but the converse is not true. It can override other symbols and still have to be called reflectively, because the overridden symbols may also be defined in refinement classes. scala> class Foo { type R1 <: { def x: Any } ; type R2 <: R1 { def x: Int } } defined class Foo scala> typeOf[Foo].member(TypeName("R2")).info.member("x": TermName).overrideChain res1: List[$r.intp.global.Symbol] = List(method x, method x) scala> res1 filterNot (_.owner.isRefinementClass) res2: List[$r.intp.global.Symbol] = List() And checking that "owner.info decl name == this" only works if name is not overloaded. So the logic is all in "isOnlyRefinementMember" now, and let's hope that suffices for a while.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 8511428d90..f879d11b0b 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2873,8 +2873,8 @@ trait Typers extends Adaptations with Tags {
templ updateAttachment att.copy(stats = stats1)
for (stat <- stats1 if stat.isDef && stat.symbol.isOverridingSymbol)
stat.symbol setFlag OVERRIDE
- }
- }
+ }
+ }
def typedImport(imp : Import) : Import = (transformed remove imp) match {
case Some(imp1: Import) => imp1