File tree 3 files changed +10
-2
lines changed
compiler/src/dotty/tools/dotc/typer
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -703,7 +703,7 @@ class Namer { typer: Typer =>
703
703
typer1.defDefSig(original, sym)(using localContext(sym).setTyper(typer1))
704
704
case imp : Import =>
705
705
try
706
- val expr1 = typedImportQualifier(imp, typedAheadExpr)
706
+ val expr1 = typedImportQualifier(imp, typedAheadExpr(_, _)( using ctx.withOwner(sym)) )
707
707
ImportType (expr1)
708
708
catch case ex : CyclicReference =>
709
709
typr.println(s " error while completing ${imp.expr}" )
Original file line number Diff line number Diff line change @@ -2457,7 +2457,7 @@ class Typer extends Namer
2457
2457
else typd(imp.expr, AnySelectionProto )
2458
2458
2459
2459
def typedImport (imp : untpd.Import , sym : Symbol )(using Context ): Import =
2460
- val expr1 = typedImportQualifier(imp, typedExpr)
2460
+ val expr1 = typedImportQualifier(imp, typedExpr(_, _)( using ctx.withOwner(sym)) )
2461
2461
checkLegalImportPath(expr1)
2462
2462
val selectors1 = typedSelectors(imp.selectors)
2463
2463
assignType(cpy.Import (imp)(expr1, selectors1), sym)
Original file line number Diff line number Diff line change
1
+ import scala .quoted ._
2
+
3
+ trait ReflectModule {
4
+ implicit def q : Quotes
5
+ import quotes .reflect ._ // error
6
+
7
+ def foo (x : TypeRepr ): Unit = ???
8
+ }
You can’t perform that action at this time.
0 commit comments