diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-28 11:32:04 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-04-30 14:26:09 +0200 |
commit | 4e277dcf4b60931776f6d38f6545382777de8891 (patch) | |
tree | beaac8a19c676678e990b518e4c8465f8ed538d8 | |
parent | 56195fcd64432078a5ddb5e7669614bb694f86aa (diff) | |
download | dotty-4e277dcf4b60931776f6d38f6545382777de8891.tar.gz dotty-4e277dcf4b60931776f6d38f6545382777de8891.tar.bz2 dotty-4e277dcf4b60931776f6d38f6545382777de8891.zip |
Fix spurious warnings in TreeChecker.
-rw-r--r-- | src/dotty/tools/dotc/transform/TreeChecker.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/transform/TreeChecker.scala b/src/dotty/tools/dotc/transform/TreeChecker.scala index 1661f7576..7c8ba8432 100644 --- a/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -50,8 +50,7 @@ class TreeChecker extends Phase with SymTransformer { def testDuplicate(sym: Symbol, registry: mutable.Map[String, Symbol], typ: String)(implicit ctx: Context) = { val name = sym.fullName.toString - if (registry.contains(name)) - if (this.flatClasses || !(sym.isAnonymousFunction || sym.isAnonymousClass || sym.isAnonymousModuleVal)) + if (this.flatClasses && registry.contains(name)) printError(s"$typ defined twice $sym ${sym.id} ${registry(name).id}") registry(name) = sym } |