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 8e2c11f commit 9164e1fCopy full SHA for 9164e1f
src/dotty/tools/dotc/typer/Typer.scala
@@ -168,6 +168,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
168
selectors match {
169
case Pair(Ident(from), Ident(Name)) :: rest =>
170
val selName = if (name.isTypeName) from.toTypeName else from
171
+ // Pass refctx so that any errors are reported in the context of the
172
+ // reference instead of the context of the import.
173
checkUnambiguous(selectionType(site, selName, tree.pos)(refctx))
174
case Ident(Name) :: rest =>
175
checkUnambiguous(selectionType(site, name, tree.pos)(refctx))
0 commit comments