@@ -119,7 +119,7 @@ object SymbolLoaders {
119
119
* All entered symbols are given a source completer of `src` as info.
120
120
*/
121
121
def enterToplevelsFromSource (
122
- owner : Symbol , name : PreName , src : AbstractFile ,
122
+ owner : Symbol , src : AbstractFile ,
123
123
scope : Scope = EmptyScope )(using Context ): Unit =
124
124
if src.exists && ! src.isDirectory then
125
125
val completer = new SourcefileLoader (src)
@@ -193,10 +193,10 @@ object SymbolLoaders {
193
193
((classRep.binary, classRep.source): @ unchecked) match {
194
194
case (Some (bin), Some (src)) if needCompile(bin, src) && ! binaryOnly(owner, nameOf(classRep)) =>
195
195
if (ctx.settings.verbose.value) report.inform(" [symloader] picked up newer source file for " + src.path)
196
- enterToplevelsFromSource(owner, nameOf(classRep), src)
196
+ enterToplevelsFromSource(owner, src)
197
197
case (None , Some (src)) =>
198
198
if (ctx.settings.verbose.value) report.inform(" [symloader] no class, picked up source file for " + src.path)
199
- enterToplevelsFromSource(owner, nameOf(classRep), src)
199
+ enterToplevelsFromSource(owner, src)
200
200
case (Some (bin), _) =>
201
201
enterClassAndModule(owner, nameOf(classRep), ctx.platform.newClassLoader(bin))
202
202
}
@@ -271,8 +271,8 @@ object SymbolLoaders {
271
271
for (classRep <- classReps)
272
272
if (! maybeModuleClass(classRep) && hasFlatName(classRep) == flat &&
273
273
(! flat || isAbsent(classRep))) // on 2nd enter of flat names, check that the name has not been entered before
274
- if packageName == " a" then
275
- report.echo(s " initialising ${classRep} for ${root.symbol} in package $packageName" )
274
+ if packageName == " a" || packageName == " b " then
275
+ report.echo(s " initialising ${classRep} for ${root.symbol} [ ${root.symbol.id} ] in package $packageName" )
276
276
initializeFromClassPath(root.symbol, classRep)
277
277
for (classRep <- classReps)
278
278
if (maybeModuleClass(classRep) && hasFlatName(classRep) == flat &&
@@ -431,7 +431,7 @@ class SourcefileLoader(val srcfile: AbstractFile) extends SymbolLoader {
431
431
def description (using Context ): String = " source file " + srcfile.toString
432
432
override def sourceFileOrNull : AbstractFile = srcfile
433
433
def doComplete (root : SymDenotation )(using Context ): Unit =
434
- ctx.run.lateCompile(srcfile, typeCheck = ctx.settings. YretainTrees .value)
434
+ ctx.run.lateCompile(srcfile, typeCheck = true ) // TODO: or if sourcePath is enabled?
435
435
}
436
436
437
437
/** A NoCompleter which is also a SymbolLoader. */
0 commit comments