File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/compiler/scala/tools/nsc Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -187,11 +187,12 @@ trait CompilerControl { self: Global =>
187187 /** If source if not yet loaded, get an outline view with askParseEntered.
188188 * If source is loaded, wait for it to be typechecked.
189189 * In both cases, set response to parsed (and possibly typechecked) tree.
190+ * @param keepSrcLoaded If set to `true`, source file will be kept as a loaded unit afterwards.
190191 */
191- def askStructure (source : SourceFile , response : Response [Tree ]) = {
192+ def askStructure (keepSrcLoaded : Boolean )( source : SourceFile , response : Response [Tree ]) = {
192193 getUnit(source) match {
193194 case Some (_) => askLoadedTyped(source, response)
194- case None => askParsedEntered(source, false , response)
195+ case None => askParsedEntered(source, keepSrcLoaded , response)
195196 }
196197 }
197198
Original file line number Diff line number Diff line change @@ -2056,11 +2056,13 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable =>
20562056 }
20572057 override def sourceModule = module
20582058 private var implicitMembersCacheValue : List [Symbol ] = List ()
2059- private var implicitMembersCacheKey : Type = NoType
2059+ private var implicitMembersCacheKey1 : Type = NoType
2060+ private var implicitMembersCacheKey2 : ScopeEntry = null
20602061 def implicitMembers : List [Symbol ] = {
20612062 val tp = info
2062- if (implicitMembersCacheKey ne tp) {
2063- implicitMembersCacheKey = tp
2063+ if ((implicitMembersCacheKey1 ne tp) || (implicitMembersCacheKey2 ne tp.decls.elems)) {
2064+ implicitMembersCacheKey1 = tp
2065+ implicitMembersCacheKey2 = tp.decls.elems
20642066 implicitMembersCacheValue = tp.implicitMembers
20652067 }
20662068 implicitMembersCacheValue
You can’t perform that action at this time.
0 commit comments