- 
                Notifications
    You must be signed in to change notification settings 
- Fork 14
Open
Milestone
Description
scala> :paste -raw
// Entering paste mode (ctrl-D to finish)
package p1; object O1 { object O2 }
// Exiting paste mode, now interpreting.
scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._
scala> rootMirror.staticModule("p1.O1").moduleClass.info.decls
res0: $r.intp.global.Scope = Scopes.Scope(constructor O1, object O2)
scala> exitingFlatten(rootMirror.staticModule("p1.O1").moduleClass.info.decls)
res1: $r.intp.global.Scope = Scopes.Scope(constructor O1)
scala> exitingFlatten(rootMirror.staticPackage("p1").moduleClass.info.decls)
res2: $r.intp.global.Scope = Scopes.Scope(object O1)
scala> res0.lookup
lookup      lookupAllEntries   lookupEntry    lookupNameInSameScopeAs   lookupSymbolEntry
lookupAll   lookupClass        lookupModule   lookupNextEntry           lookupUnshadowedEntries
scala> res0.lookup(TermName("O2"))
res3: $r.intp.global.Symbol = object O2
scala> exitingFlatten(res3.name)
res4: res3.NameType = O1$O2
scala> exitingFlatten(res3.owner)
res5: $r.intp.global.Symbol = package p1
Why does the flatten info transform leave poor static module symbols in limbo? It seems that when we forget to call exitingPicker(classSym.companionModule), we end up either not seeing the companion, or seeing a companion based on a classfile from a previous run.
Follow up for #402
Metadata
Metadata
Assignees
Labels
No labels