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 @@ -2450,7 +2450,7 @@ class Typer extends Namer
2450
2450
else typd(imp.expr, AnySelectionProto )
2451
2451
2452
2452
def typedImport (imp : untpd.Import , sym : Symbol )(using Context ): Import =
2453
- val expr1 = typedImportQualifier(imp, typedExpr)
2453
+ val expr1 = typedImportQualifier(imp, typedExpr(_, _)( using ctx.withOwner(sym)) )
2454
2454
checkLegalImportPath(expr1)
2455
2455
val selectors1 = typedSelectors(imp.selectors)
2456
2456
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