@@ -13,9 +13,9 @@ object ImportInfo {
13
13
/** The import info for a root import from given symbol `sym` */
14
14
def rootImport (refFn : () => TermRef )(implicit ctx : Context ) = {
15
15
val selectors = untpd.Ident (nme.WILDCARD ) :: Nil
16
- def expr = tpd.Ident (refFn())
17
- def imp = tpd.Import (expr, selectors)
18
- new ImportInfo (imp.symbol, selectors, None , isRootImport = true )
16
+ def expr ( implicit ctx : Context ) = tpd.Ident (refFn())
17
+ def imp ( implicit ctx : Context ) = tpd.Import (expr, selectors)
18
+ new ImportInfo (implicit ctx => imp.symbol, selectors, None , isRootImport = true )
19
19
}
20
20
}
21
21
@@ -27,14 +27,14 @@ object ImportInfo {
27
27
* @param isRootImport true if this is one of the implicit imports of scala, java.lang,
28
28
* scala.Predef or dotty.DottyPredef in the start context, false otherwise.
29
29
*/
30
- class ImportInfo (symf : => Symbol , val selectors : List [untpd.Tree ],
30
+ class ImportInfo (symf : Context => Symbol , val selectors : List [untpd.Tree ],
31
31
symNameOpt : Option [TermName ], val isRootImport : Boolean = false )(implicit ctx : Context ) {
32
32
33
33
// Dotty deviation: we cannot use a lazy val here for the same reason
34
34
// that we cannot use one for `DottyPredefModuleRef`.
35
- def sym = {
35
+ def sym ( implicit ctx : Context ) = {
36
36
if (mySym == null ) {
37
- mySym = symf
37
+ mySym = symf(ctx)
38
38
assert(mySym != null )
39
39
}
40
40
mySym
0 commit comments