summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerard Basler <gerard.basler@gmail.com>2015-05-03 15:46:50 +0200
committerGerard Basler <gerard.basler@gmail.com>2015-05-03 15:46:50 +0200
commita094654b4dc4a9d911f36ab8bfc7451872bcee53 (patch)
tree5da312377d900a0c2c7c64cd91371165792b6133 /src
parent36f2028fba8c8ed4e9cc82f5665edd1b233c88fc (diff)
downloadscala-a094654b4dc4a9d911f36ab8bfc7451872bcee53.tar.gz
scala-a094654b4dc4a9d911f36ab8bfc7451872bcee53.tar.bz2
scala-a094654b4dc4a9d911f36ab8bfc7451872bcee53.zip
Avoid `Set` instantiation.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/Logic.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
index cef22d7d6b..227c45b3a7 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
@@ -384,9 +384,8 @@ trait Logic extends Debugging {
// ... and what must not?
excluded foreach {
excludedSym =>
- val related = Set(sym, excludedSym)
val exclusive = v.groupedDomains.exists {
- domain => related subsetOf domain.toSet
+ domain => domain.contains(sym) && domain.contains(excludedSym)
}
// TODO: populate `v.exclusiveDomains` with `Set`s from the start, and optimize to: