diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-30 13:17:17 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-02 15:36:55 +0200 |
commit | a727c6fc198d33842ff85d8a16d48143a6757d51 (patch) | |
tree | 3b995ade8066488c3ac42d7b65e0bb02b976cabc /src/reflect/scala/reflect/internal/Symbols.scala | |
parent | 937da62be2834a646a31dbfb01527a82672f111e (diff) | |
download | scala-a727c6fc198d33842ff85d8a16d48143a6757d51.tar.gz scala-a727c6fc198d33842ff85d8a16d48143a6757d51.tar.bz2 scala-a727c6fc198d33842ff85d8a16d48143a6757d51.zip |
SI-5732 members and derivatives now return Scope
Firstly this unifies the reflection API - now both decls and members
return Scope (not Scope and List[Symbol] as it were before).
Secondly this fixes SI-5732 without having to sort the result of members.
Type.members now returns Scope, a distinguished type, which has the
`sorted` method, which does the required sorting if necessary.
Also removes nonPrivateMembers and nonPrivateDeclarations to keep the API
minimalistic (as can be seen from their implementation in internal.Types
they are just members and decls with bridges and private members removed).
Diffstat (limited to 'src/reflect/scala/reflect/internal/Symbols.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index e6a9cb46c6..05ead8d1ac 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -2890,7 +2890,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => private[this] var typeOfThisCache: Type = _ private[this] var typeOfThisPeriod = NoPeriod - private var implicitMembersCacheValue: List[Symbol] = Nil + private var implicitMembersCacheValue: Scope = EmptyScope private var implicitMembersCacheKey1: Type = NoType private var implicitMembersCacheKey2: ScopeEntry = null @@ -2909,7 +2909,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => typeOfThisCache } - def implicitMembers: List[Symbol] = { + def implicitMembers: Scope = { val tp = info if ((implicitMembersCacheKey1 ne tp) || (implicitMembersCacheKey2 ne tp.decls.elems)) { // Skip a package object class, because the members are also in |