aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorOndrej Lhotak <olhotak@uwaterloo.ca>2014-10-10 13:50:15 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-22 20:10:21 +0100
commit6ef59b13f27154da202c0096c7841a0b0ecb9f92 (patch)
tree9b051c128ef0d5bf5e517b2cac74ce1be4d18c75 /src/dotty/tools/dotc/typer/Typer.scala
parent36cb1028c0806991fae9e5d33fe9cb0f2d596ed0 (diff)
downloaddotty-6ef59b13f27154da202c0096c7841a0b0ecb9f92.tar.gz
dotty-6ef59b13f27154da202c0096c7841a0b0ecb9f92.tar.bz2
dotty-6ef59b13f27154da202c0096c7841a0b0ecb9f92.zip
add comment to explain why refctx passed explicitly to selectionType
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index fa8ea6ec2..d0757ab36 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -169,6 +169,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
selectors match {
case Pair(Ident(from), Ident(Name)) :: rest =>
val selName = if (name.isTypeName) from.toTypeName else from
+ // Pass refctx so that any errors are reported in the context of the
+ // reference instead of the context of the import.
checkUnambiguous(selectionType(site, selName, tree.pos)(refctx))
case Ident(Name) :: rest =>
checkUnambiguous(selectionType(site, name, tree.pos)(refctx))