diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-20 21:56:14 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-21 01:18:20 -0700 |
commit | a2ad291acd159ed299eb30305e42a0bace95f02a (patch) | |
tree | 63dc189dea7b1096232da0a4e0d0edfdf676578f /test/files/run/t3425.check | |
parent | 085b4d9bdb7ba9f9fe00c63e998e93278a34b161 (diff) | |
download | scala-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 'test/files/run/t3425.check')
-rw-r--r-- | test/files/run/t3425.check | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/run/t3425.check b/test/files/run/t3425.check new file mode 100644 index 0000000000..5be779bd74 --- /dev/null +++ b/test/files/run/t3425.check @@ -0,0 +1,4 @@ +123 +456 +789 +789 |