aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-15 21:46:25 +1100
committerMartin Odersky <odersky@gmail.com>2017-01-15 21:46:25 +1100
commiteb1063725d74395a86b3191fc658b7963f07c4b5 (patch)
treee913c46b4034c9a596027a3b179cc897013b5531 /compiler/src/dotty/tools/dotc/typer/Typer.scala
parentba7e12999dc645dbcba04cf365dfd4d621ee4662 (diff)
downloaddotty-eb1063725d74395a86b3191fc658b7963f07c4b5.tar.gz
dotty-eb1063725d74395a86b3191fc658b7963f07c4b5.tar.bz2
dotty-eb1063725d74395a86b3191fc658b7963f07c4b5.zip
Adopt scala's scheme for root import hiding
scalac hides a root import from Predef if there is an eplicit Predef import. We now do the same (previously we did this only if the overriding import undefined something, using a `x => _` syntax). To avoid cycles and races one had to be very careful not to force import symbols too early, so we now compare the name before the symbol proper. All this is likely temporary - the comment of ImportInfo#unimported points to a different, more systematic solution.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala
index a053a0b0d..d05a0aaa7 100644
--- a/compiler/src/dotty/tools/dotc/typer/Typer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1588,7 +1588,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
case (imp: untpd.Import) :: rest =>
val imp1 = typed(imp)
buf += imp1
- traverse(rest)(importContext(imp1.symbol, imp.selectors))
+ traverse(rest)(importContext(imp, imp1.symbol))
case (mdef: untpd.DefTree) :: rest =>
mdef.removeAttachment(ExpandedTree) match {
case Some(xtree) =>