diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-02 13:17:04 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-11 19:21:02 +0200 |
commit | 2f01c7d1ba4ab4d542c3838e184a5ac9735578f4 (patch) | |
tree | 7b02dfc4c3d16c5540a8d85232950e7e6357c51b /src/dotty | |
parent | 2fe7e9220ab12336d4dcddbe9b523a736a6c17e8 (diff) | |
download | dotty-2f01c7d1ba4ab4d542c3838e184a5ac9735578f4.tar.gz dotty-2f01c7d1ba4ab4d542c3838e184a5ac9735578f4.tar.bz2 dotty-2f01c7d1ba4ab4d542c3838e184a5ac9735578f4.zip |
Don't report double def errors if symbol's type is erroneous
This happened for singletonOrs, and led to spurious errors there.
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 4f01c43cf..0f95fc591 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -336,7 +336,8 @@ object Denotations { (!sym2.isAsConcrete(sym1) || precedes(sym1.owner, sym2.owner) || accessBoundary(sym2).isProperlyContainedIn(accessBoundary(sym1)) || - sym1.is(Method) && !sym2.is(Method)) + sym1.is(Method) && !sym2.is(Method)) || + sym1.info.isErroneous /** Sym preference provided types also override */ def prefer(sym1: Symbol, sym2: Symbol, info1: Type, info2: Type) = |