We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bb20fe commit a49ccd0Copy full SHA for a49ccd0
src/dotty/tools/dotc/typer/Typer.scala
@@ -169,6 +169,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
169
selectors match {
170
case Pair(Ident(from), Ident(Name)) :: rest =>
171
val selName = if (name.isTypeName) from.toTypeName else from
172
+ // Pass refctx so that any errors are reported in the context of the
173
+ // reference instead of the context of the import.
174
checkUnambiguous(selectionType(site, selName, tree.pos)(refctx))
175
case Ident(Name) :: rest =>
176
checkUnambiguous(selectionType(site, name, tree.pos)(refctx))
0 commit comments