diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-29 18:51:33 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-29 19:12:18 +0100 |
commit | 32f31b8924d16074679bfa0857019d3ba078c4a2 (patch) | |
tree | 40511677d6fe36cc505bfa46e1a09e8732097cfd /src/dotty/tools/dotc/typer/Typer.scala | |
parent | 51ab200f97f11ac74270f6925028ba4d58284e7b (diff) | |
download | dotty-32f31b8924d16074679bfa0857019d3ba078c4a2.tar.gz dotty-32f31b8924d16074679bfa0857019d3ba078c4a2.tar.bz2 dotty-32f31b8924d16074679bfa0857019d3ba078c4a2.zip |
Fix #884 - misdiagnosed ambiguous definition.
Universal equality strikes again. Caused a bug in
isDefinedInCurrentUnit.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 52ea32bbc..3ca728895 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -200,7 +200,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit */ def isDefinedInCurrentUnit(denot: Denotation): Boolean = denot match { case MultiDenotation(d1, d2) => isDefinedInCurrentUnit(d1) || isDefinedInCurrentUnit(d2) - case denot: SingleDenotation => denot.symbol.sourceFile == ctx.source + case denot: SingleDenotation => denot.symbol.sourceFile == ctx.source.file } /** Is `denot` the denotation of a self symbol? */ |